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

Fails in Web Worker #268

Closed
curran opened this issue Jan 20, 2024 · 0 comments · Fixed by #269
Closed

Fails in Web Worker #268

curran opened this issue Jan 20, 2024 · 0 comments · Fixed by #269

Comments

@curran
Copy link
Contributor

curran commented Jan 20, 2024

Related to #258

In Web Workers, btoa is defined as a global, but window is not.

This error is thrown in a Web Worker:

https://github.com/Rich-Harris/magic-string/blob/master/src/SourceMap.js#L10

Suggested fix: check for btoa not window.btoa.

curran added a commit to curran/magic-string that referenced this issue Jan 20, 2024
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.

1 participant