Skip to content

Commit dffc542

Browse files
Jake ChampionJakeChampion
authored andcommitted
use globals if they exist
solves #860
1 parent 7d92dff commit dffc542

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fetch.js

Lines changed: 1 addition & 1 deletion
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)