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

Use native AbortController when possible. #24

Open
Gozala opened this issue Aug 18, 2020 · 1 comment · May be fixed by #27
Open

Use native AbortController when possible. #24

Gozala opened this issue Aug 18, 2020 · 1 comment · May be fixed by #27

Comments

@Gozala
Copy link

Gozala commented Aug 18, 2020

This library uses browser field of package.json in order to avoid including a shim and uses own implementation otherwise. That however creates problems when used in Electron (main process) because there it loads a own implementation which native APIs like fetch reject with error like:

TypeError: Failed to execute 'fetch' on 'Window': member signal is not of type AbortSignal.

It would be nice if implementation still checked for presence of native AbortSignal just in case it exists.

@martinheidegger
Copy link

Just in case other people stumble over this, there is the package https://github.com/achingbrain/native-abort-controller that works around this particular issue.

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 a pull request may close this issue.

2 participants