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

Comments

Projects
None yet
2 participants
@ahutchings

ahutchings commented Nov 5, 2014

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

This comment has been minimized.

Show comment
Hide comment
@latentflip

latentflip Nov 5, 2014

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.

Contributor

latentflip commented Nov 5, 2014

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

This comment has been minimized.

Show comment
Hide comment
@latentflip

latentflip Nov 5, 2014

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.

Contributor

latentflip commented Nov 5, 2014

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.

@latentflip latentflip closed this Nov 5, 2014

@ahutchings

This comment has been minimized.

Show comment
Hide comment
@ahutchings

ahutchings Nov 5, 2014

Great, thanks!

ahutchings commented Nov 5, 2014

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment