From af607838726da9edd6ddefbf75f2212b90837f23 Mon Sep 17 00:00:00 2001 From: k0s00ly Date: Tue, 7 Jul 2020 18:13:49 -0700 Subject: [PATCH] check if Content-Type header exists prior to examining the value --- fetch.js | 1 + 1 file changed, 1 insertion(+) diff --git a/fetch.js b/fetch.js index b251ee39..3c02d57e 100644 --- a/fetch.js +++ b/fetch.js @@ -515,6 +515,7 @@ export function fetch(input, init) { xhr.responseType = 'blob' } else if ( support.arrayBuffer && + request.headers.get('Content-Type') && request.headers.get('Content-Type').indexOf('application/octet-stream') !== -1 ) { xhr.responseType = 'arraybuffer'