diff options
author | Kael Zhang <i+github@kael.me> | 2018-05-24 15:17:17 +0800 |
---|---|---|
committer | Matteo Collina <hello@matteocollina.com> | 2018-05-28 22:04:35 +0200 |
commit | 9f4bf4ca43bc40f68a05c87081a9bae8736515b1 (patch) | |
tree | f432b7a9b1de91a1a3abb571f4a7cfb94cf73740 /lib/_stream_readable.js | |
parent | 4dbfb096f04c49aaa8349626296193ecff6bf2f6 (diff) | |
download | android-node-v8-9f4bf4ca43bc40f68a05c87081a9bae8736515b1.tar.gz android-node-v8-9f4bf4ca43bc40f68a05c87081a9bae8736515b1.tar.bz2 android-node-v8-9f4bf4ca43bc40f68a05c87081a9bae8736515b1.zip |
stream: fix removeAllListeners() for Stream.Readable
Fixes: https://github.com/nodejs/node/issues/20923
PR-URL: https://github.com/nodejs/node/pull/20924
Refs: https://github.com/nodejs/node/issues/20923
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'lib/_stream_readable.js')
-rw-r--r-- | lib/_stream_readable.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 7c11978c12..a8e52f5f1d 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -846,7 +846,7 @@ Readable.prototype.removeListener = function(ev, fn) { }; Readable.prototype.removeAllListeners = function(ev) { - const res = Stream.prototype.removeAllListeners.call(this, ev); + const res = Stream.prototype.removeAllListeners.apply(this, arguments); if (ev === 'readable' || ev === undefined) { // We need to check if there is someone still listening to |