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

Compatible global equals to the false #967

Merged
merged 1 commit into from
May 10, 2021

Conversation

cn-coderl
Copy link
Contributor

In some special environments, such as webview in certain scenes.
globalThis self global Neither holds, var global will be equal to false.
The following code will throw an error.

searchParams: 'URLSearchParams' in global,
iterable: 'Symbol' in global && 'iterator' in Symbol,

// 'URLSearchParams' in false

TypeError: Cannot use 'in' operator to search for 'URLSearchParams' in false

@cn-coderl
Copy link
Contributor Author

@JakeChampion Excuse me, the workflow needs approval.

@JakeChampion JakeChampion merged commit 7727e50 into JakeChampion:master May 10, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants