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

fix: use globalThis.fetch in ctx.fetch utility #1490

Merged
merged 2 commits into from Dec 7, 2022

Conversation

Toxiapo
Copy link
Contributor

@Toxiapo Toxiapo commented Dec 6, 2022

This PR updates the fetch reference from window.fetch to globalThis.fetch in the useFetch function for broader environment support (Edge Runtime).

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 6, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a280eaa:

Sandbox Source
MSW React Configuration

@Toxiapo Toxiapo marked this pull request as ready for review December 7, 2022 02:00
Copy link
Member

@kettanaito kettanaito left a comment

Choose a reason for hiding this comment

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

A great addition! Thank you for tackling this, @Toxiapo!

@kettanaito kettanaito changed the title fix: change the fetch reference in useFetch function fix: use globalThis.fetch in ctx.fetch utility Dec 7, 2022
@kettanaito kettanaito merged commit 42cdbc7 into mswjs:main Dec 7, 2022
@kettanaito
Copy link
Member

Released: v0.49.2 🎉

This has been released in v0.49.2!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants