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

FIX ReferenceError: Worker is not defined in shared worker #45

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

pubkey
Copy link
Contributor

@pubkey pubkey commented Feb 10, 2024

Currently when this package is used somewhere in between a Shared worker, simply the import/require will fail because it does not have the Worker API set on the globals.
Uncaught ReferenceError: Worker is not defined

This PR adds a check for undefined and only exports the Worker API when it really exists.

@developit developit merged commit f4a731f into developit:main Jan 31, 2025
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.

3 participants