Skip to content

Commit

Permalink
use globals if they exist
Browse files Browse the repository at this point in the history
solves #860
  • Loading branch information
Jake Champion committed Jul 18, 2023
1 parent 7d92dff commit 1d8f2d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ export function fetch(input, init) {
}
}

if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers)) {
if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {
Object.getOwnPropertyNames(init.headers).forEach(function(name) {
xhr.setRequestHeader(name, normalizeValue(init.headers[name]))
})
Expand Down

0 comments on commit 1d8f2d9

Please sign in to comment.