Skip to content

Conversation

@jerzyjankowski
Copy link

When running in web worker context no global variable is available, instead self is used. Current error: UncaughtReferenceError: global is not defined.

@mreinstein
Copy link

it seems like globalThis might be a better solution in that it should work in more environments:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis

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.

2 participants