Skip to content

Commit 3c0efb5

Browse files
check if Content-Type header exists prior to examining the value (#792)
Co-authored-by: Jake Champion <me@jakechampion.name>
1 parent 0828635 commit 3c0efb5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fetch.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ export function fetch(input, init) {
515515
xhr.responseType = 'blob'
516516
} else if (
517517
support.arrayBuffer &&
518+
request.headers.get('Content-Type') &&
518519
request.headers.get('Content-Type').indexOf('application/octet-stream') !== -1
519520
) {
520521
xhr.responseType = 'arraybuffer'

0 commit comments

Comments
 (0)