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

util.deprecate causes a stack overflow in browser #11

Closed
bernardmcmanus opened this issue Mar 30, 2016 · 1 comment
Closed

util.deprecate causes a stack overflow in browser #11

bernardmcmanus opened this issue Mar 30, 2016 · 1 comment

Comments

@bernardmcmanus
Copy link
Contributor

When util.js is bundled with browserify and run in browser, util.deprecate falls into an infinite loop here because process is not namespaced to global - it's only global within the context of the browserify bundle.

I can see where this would fall to @substack considering this deviates from the node environment, but I can also see why they would not want to set window.process from within a bundle. Checking typeof process rather than isUndefined(global.process) would be a simple solution.

Regardless, the --no-deprecation check should occur first to provide a way to avoid this.

Demo here.

bernardmcmanus added a commit to bernardmcmanus/node-util that referenced this issue Mar 30, 2016
bernardmcmanus added a commit to bernardmcmanus/node-util that referenced this issue Oct 31, 2018
@bernardmcmanus
Copy link
Contributor Author

Resolved by #12

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

No branches or pull requests

1 participant