diff --git a/fetch.js b/fetch.js index 5b5c5ffc..f9a9d84f 100644 --- a/fetch.js +++ b/fetch.js @@ -543,7 +543,7 @@ export function fetch(input, init) { } // This check if specifically for when a user fetches a file locally from the file system // Only if the status is out of a normal range - if (request.url.startsWith('file://') && (xhr.status < 200 || xhr.status > 599)) { + if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) { options.status = 200; } else { options.status = xhr.status;