Skip to content

Commit dffc542

Browse files
Jake ChampionJakeChampion
Jake Champion
authored andcommittedJul 18, 2023
use globals if they exist
solves #860
1 parent 7d92dff commit dffc542

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎fetch.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ export function fetch(input, init) {
589589
}
590590
}
591591

592-
if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers)) {
592+
if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {
593593
Object.getOwnPropertyNames(init.headers).forEach(function(name) {
594594
xhr.setRequestHeader(name, normalizeValue(init.headers[name]))
595595
})

0 commit comments

Comments
 (0)
Please sign in to comment.