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

detect globalThis #2775

Merged
merged 1 commit into from
Feb 2, 2021
Merged

detect globalThis #2775

merged 1 commit into from
Feb 2, 2021

Conversation

pkit
Copy link
Contributor

@pkit pkit commented Feb 2, 2021

globalThis is a standard global right now
should use it whenever available

The current code fails in sandbox environments where only standard globaThis exists (regression from 5.x which works fine)

Code change checklist

  • Added/updated unit tests
  • Updated /docs. For new functionality, at least API.md should be updated
  • Verified that there is no significant performance drop (npm run perf)

@changeset-bot
Copy link

changeset-bot bot commented Feb 2, 2021

🦋 Changeset detected

Latest commit: 0b7ce41

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
mobx Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@danielkcz
Copy link
Contributor

Never heard of globalThis, do you have more information and why it should take precedence over other options?

Also, you need to rebase on the latest code and include changeset set per the comment above.

@pkit
Copy link
Contributor Author

pkit commented Feb 2, 2021

`globalThis` is a __standard__ global right now
should use it whenever available
@danielkcz
Copy link
Contributor

Thanks, I see it's supported in major browsers, that's good to know. I guess it's safe to merge.

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