When I tried to use `fetch` with `undefined` headers, the promise will be rejected with `TypeError: undefined is not an object`. Ex. `fetch('/my-awesome-api', { headers: undefined })` ``` TypeError: undefined is not an object anonymous fillFetchHeaders initializeFetchRequest [native code] fetch tryCatch invoke step (anonymous function) run (anonymous function) flush ``` I'm using OSX 10.11 El Capitan and on Safari 10.1 (11603.1.30.0.34). I know there's another [bugzilla issue](https://bugs.webkit.org/show_bug.cgi?id=168043) about this issue. However, I still face this issue. If the fix is released yet, please kindly help me to close this issue. Thanks.
The next Safari release will probably include it. In the meantime, could you use a workaround like not setting the "headers" key when its value would be undefined?
Hi youenn fablet, Yes, I've tried to use empty object to handle this issue and it works fine. Ex. ``` fetch('/my-awesome-api', { headers: headers || {} }); ``` Hope it will be released soon, thanks!
Closing bug as fixed. Please reopen if needed.