Skip to content
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

Fix the context scope of SystemJS.register when called from browsers System.register #1706

Merged

Conversation

joeljeske
Copy link

The SystemJS.register requires the correct this. If modules are registered using System.register (as opposed to SystemJS.register) AND there exists another global.System object, the register module call fails, in my case the error was:

register-loader.js:456 Uncaught TypeError: Cannot set property 'lastRegister' of undefined
    at Object.RegisterLoader$1.register (register-loader.js:456)
    at Object.systemJSPrototype.register (systemjs-production-loader.js:206)
    at Object.envGlobal.System.register (system-production.js:22)
    at main.js:1

@guybedford
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants