Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: bind globalThis.fetch to globalThis (#1242)
This makes the assigned fetch behave a bit differently than a regular `globalThis.fetch`. a globalThis.fetch will sometimes fail if you do `const me = { fetch }; await me.fetch(url)` but now this bound one won't and will instead behave differently than `globalThis.fetch`. I think the difference in behavior doesn't matter too much because we just use the assigned fetch right away without passing it along or calling it in such a way that we'd change the default behavior of function calling where `this` is `globalThis` in a way that all `fetch` i've encountered can work with.
- Loading branch information