remove() end early - #34
Conversation
|
Could you please example the problem better? |
|
The problem is Squire throws if |
|
I also noticed |
|
The same is true for |
|
@singingwolfboy Could you add a test around this? I'm struggling to know when you wouldn't have a context? |
|
I can't exactly explain why context is ending up |
|
@iammerrick The issue was that inside of I have proposed a solution, in pull request #49. The solution implemented in this patch is to rebuild a new RequireJS context, after deleting the initial context. This way the RequireJS context is fresh, as the remove call would indicate it should be, while also still being defined for subsequent calls. Additionally, there should no longer be an edge case that leads to the context being undefined in the first place, as was the initial symptom of the issue. |
|
Having the same issue. And this pull request fixes it in my case. |
I was having a problem while using Squire.js with my test suite, where the context was undefined when I called
injector.remove(). This modification fixed it. I also removed trailing whitespace in a separate commit.