-
-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Closed
Description
Describe the bug
This change here removes the global fetch as part of the globalFetchAPI.
That's fine for initial load because export const getFetch = (config) => { on line 264 will pass an undefined config and make env = {} which will safely destructure.
However, when making a request, getFetch is called from an adapter (not on static load), and it has a config however config.env is undefined. That causes line 266 to throw because config is defined, but .env is not so you get a destructiing error.
To Reproduce
See Codesandbox where fetch is forced as the default and errors - https://codesandbox.io/p/sandbox/6z72dh
Expected behavior
It should support environments where fetch is the only option.
Axios Version
1.12.2
Adapter Version
fetch
Browser
all
Browser Version
any
Node.js Version
latest
OS
all
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels