node-fetch
Advanced tools
Comparing version 2.6.11 to 2.6.12
@@ -1741,4 +1741,7 @@ process.emitWarning("The .es.js file is deprecated. Use .mjs instead."); | ||
response.once('close', function (hadError) { | ||
// tests for socket presence, as in some situations the | ||
// the 'socket' event is not triggered for the request | ||
// (happens in deno), avoids `TypeError` | ||
// if a data listener is still present we didn't end cleanly | ||
const hasDataListener = socket.listenerCount('data') > 0; | ||
const hasDataListener = socket && socket.listenerCount('data') > 0; | ||
@@ -1745,0 +1748,0 @@ if (hasDataListener && !hadError) { |
@@ -1745,4 +1745,7 @@ 'use strict'; | ||
response.once('close', function (hadError) { | ||
// tests for socket presence, as in some situations the | ||
// the 'socket' event is not triggered for the request | ||
// (happens in deno), avoids `TypeError` | ||
// if a data listener is still present we didn't end cleanly | ||
const hasDataListener = socket.listenerCount('data') > 0; | ||
const hasDataListener = socket && socket.listenerCount('data') > 0; | ||
@@ -1749,0 +1752,0 @@ if (hasDataListener && !hadError) { |
{ | ||
"name": "node-fetch", | ||
"version": "2.6.11", | ||
"version": "2.6.12", | ||
"description": "A light-weight module that brings window.fetch to node.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
162145
4634