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

Failed to construct 'Request': Please use the 'new' operator, this DOM object constructor cannot be called as a function #286

Closed
jasonmit opened this issue Dec 24, 2019 · 2 comments · Fixed by #287
Labels
bug 🐞 Something isn't working 📦 adapter-fetch

Comments

@jasonmit
Copy link
Contributor

jasonmit commented Dec 24, 2019

Error

Failed to construct 'Request': Please use the 'new' operator, this DOM object constructor cannot be called as a function.

Offending line

_this2 = possibleConstructorReturn(this, getPrototypeOf$2(ExtendedRequest).call(this, url, options));

Reproduction (thanks to @dheeraj-jn for putting this together):
https://codesandbox.io/s/fragrant-pine-cwnox

This looks to be caused by the way babel transpiles the super call within ExtendedRequest.

@jasonmit jasonmit added 📦 adapter-fetch bug 🐞 Something isn't working labels Dec 24, 2019
offirgolan added a commit that referenced this issue Dec 25, 2019
* fix(adapter-fetch): Fix "failed to construct Request" issue

Resolves #286.
@offirgolan
Copy link
Collaborator

Resolved with v3.0.1.

@jasonmit
Copy link
Contributor Author

Thanks @offirgolan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working 📦 adapter-fetch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants