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

this._unset is undefined in the browser #1573

Closed
don-smith opened this issue Jun 28, 2020 · 3 comments
Closed

this._unset is undefined in the browser #1573

don-smith opened this issue Jun 28, 2020 · 3 comments

Comments

@don-smith
Copy link

don-smith commented Jun 28, 2020

I haven't chased this down completely, but I don't think https://github.com/visionmedia/superagent/blob/master/src/node/index.js#L134 is being invoked in the browser, such as in a webpack bundle. Which means _unset is not defined before https://github.com/visionmedia/superagent/blob/master/src/request-base.js#L367 is called, which is where I'm seeing this error happen. This line was added a couple of hours ago as part of version 5.3.0.

@don-smith
Copy link
Author

@dobesv and @niftylettuce I think this is going to affect anyone setting headers in the browser.

@niftylettuce
Copy link
Collaborator

I deprecated v5.3.0 in the interim. Let me rollback that commit and publish new.

@niftylettuce
Copy link
Collaborator

v5.3.1 published with the fix, in the interim I deprecated v5.3.0 in npm and also commented on #1560 about this

https://github.com/visionmedia/superagent/releases/tag/v5.3.1

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

2 participants