diff --git a/lib/response.js b/lib/response.js index 398993a..242f0bc 100644 --- a/lib/response.js +++ b/lib/response.js @@ -74,6 +74,11 @@ var IncomingMessage = exports.IncomingMessage = function (xhr, response, mode, f } catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this } // fallback for when writableStream or pipeTo aren't available + if (!response.body) { + global.clearTimeout(fetchTimer) + self.push(null) + return + } var reader = response.body.getReader() function read () { reader.read().then(function (result) {