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

Breaks in workers #2

Closed
ahutchings opened this issue Nov 5, 2014 · 3 comments
Closed

Breaks in workers #2

ahutchings opened this issue Nov 5, 2014 · 3 comments

Comments

@ahutchings
Copy link

ampersand-version has a hard dependency on window, which doesn't exist in web workers and throws Uncaught ReferenceError: window is not defined.

I confirmed that ampersand-state functions in a worker if window is changed to global in ampersand-version. Browserify will resolve global to the appropriate context in both browser windows and workers.

@latentflip
Copy link
Contributor

Ooft, good spot, my bad. I think I'll change this to only export version info if window exists, as that probably makes more sense.

@latentflip
Copy link
Contributor

Okay, published as 1.0.2

You'll need to either reinstall your node modules to pick it up in all the sub dependencies, or install "ampersand-version": "^1.0.2" at the top level of your app.

@ahutchings
Copy link
Author

Great, 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 a pull request may close this issue.

2 participants