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

System instance not being injected into modules anymore #1276

Closed
rksm opened this issue May 19, 2016 · 2 comments
Closed

System instance not being injected into modules anymore #1276

rksm opened this issue May 19, 2016 · 2 comments

Comments

@rksm
Copy link

rksm commented May 19, 2016

When creating a new System loader instance, this instance was available as global System object inside the modules it imported until systemjs@0.19.27 but breaks in systemjs@0.19.28

loading.js

var newSystem = new (System.constructor)();
newSystem["import"]("./test-module.js")
  .then(m => console.log(`Is the System instance in test-module.js the same as used for importing it? ${m.observedSystem === newSystem}`))
  .catch(err => console.error(err));

test-module.js

export var observedSystem = System;

Result: Is the System instance in test-module.js the same as used for importing it? false
Expected: s the System instance in test-module.js the same as used for importing it? true

@guybedford
Copy link
Member

Thanks yes that's a regression, fixed in e0e6102.

@rksm
Copy link
Author

rksm commented May 20, 2016

👍

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

No branches or pull requests

2 participants