-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove() end early #34
base: master
Are you sure you want to change the base?
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.