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

Don't throw when global is not defined #45

Merged
merged 1 commit into from
Jun 22, 2024

Conversation

TooTallNate
Copy link
Contributor

global is not defined in some environments such as CF Workers and Vercel Edge Functions. Be defensive against that.

`global` is not defined in some environments such as CF Workers and Vercel Edge Functions. Be defensive against that.
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typically my response to this category of thing is "this is a node module, which is designed to only be used in node, or via a working node module bundler" (eg, a working node module bundler transforms global as needed).

However, since this specific package doesn't have anything else node-specific besides uses of require, this is a reasonable change to accept.

@ljharb ljharb merged commit d4d0965 into inspect-js:main Jun 22, 2024
328 checks passed
@TooTallNate TooTallNate deleted the patch-1 branch June 22, 2024 05:56
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