We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff90d95 commit 57e292dCopy full SHA for 57e292d
lib/internal/streams/readable.js
@@ -787,7 +787,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
787
debug('onerror', er);
788
unpipe();
789
dest.removeListener('error', onerror);
790
- if (EE.listenerCount(dest, 'error') === 0) {
+ if (dest.listenerCount('error') === 0) {
791
const s = dest._writableState || dest._readableState;
792
if (s && !s.errorEmitted) {
793
// User incorrectly emitted 'error' directly on the stream.
@@ -852,7 +852,7 @@ function pipeOnDrain(src, dest) {
852
}
853
854
if ((!state.awaitDrainWriters || state.awaitDrainWriters.size === 0) &&
855
- EE.listenerCount(src, 'data')) {
+ src.listenerCount('data')) {
856
src.resume();
857
858
};
0 commit comments