fetch doesn't work when you don't pass a second init argument, which is against the spec and what fetch normally does, i.e.
const response = await fetch('...');
Will fail with the error TypeError: init is undefined. This is due to trying to access the timeout property of init when it should check init exists before it does the access:
fetch
doesn't work when you don't pass a secondinit
argument, which is against the spec and whatfetch
normally does, i.e.Will fail with the error
TypeError: init is undefined
. This is due to trying to access thetimeout
property ofinit
when it should checkinit
exists before it does the access:https://github.com/robinpowered/react-native-fetch-polyfill/blob/91bda0325bb7cdcb135b88b9e12f7699c2ec81df/fetch-polyfill.js#L43