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

window -> self #109

Merged
merged 1 commit into from
Sep 29, 2020
Merged

window -> self #109

merged 1 commit into from
Sep 29, 2020

Conversation

developit
Copy link
Owner

@developit developit commented Jan 15, 2019

Replace window with self to allow use in Web Workers.
The main library was already doing this, just not isomorphic-unfetch.

Fixes #104.

Replace `window` with `self` to allow use in Web Workers.
@yanivefraim
Copy link

yanivefraim commented Jul 23, 2020

Any chance to merge this? We need isomorphic-unfetch on a web-worker. Thanks!

@developit
Copy link
Owner Author

This fix was released in 4.2.0. Sorry for the super long wait!

@bricker
Copy link

bricker commented Jan 6, 2021

For the record (and for googlers), this change breaks this library in a React Native environment with error "Can't find variable: self".

Quick fix is to roll back to isomorphic-unfetch 3.0.0.

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.

window not defined in web workers
3 participants