From e2ffa454d3ba6a5787c92c01eeff8020baa853d5 Mon Sep 17 00:00:00 2001 From: Denys Otrishko Date: Sun, 23 Aug 2020 12:15:38 +0300 Subject: [PATCH] stream: fix Readable stream state properties Looks like they have been accidentally moved in https://github.com/nodejs/node/pull/31144. PR-URL: https://github.com/nodejs/node/pull/34886 Reviewed-By: Robert Nagy Reviewed-By: Luigi Pinca Reviewed-By: Matteo Collina Reviewed-By: Zeyu Yang Reviewed-By: Anto Aravinth Reviewed-By: Ricky Zhou <0x19951125@gmail.com> --- lib/_stream_readable.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 83db0f0ad13..53549668717 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -1216,13 +1216,17 @@ ObjectDefineProperties(Readable.prototype, { } }, - // Legacy getter for `pipesCount` +}); + +ObjectDefineProperties(ReadableState.prototype, { + // Legacy getter for `pipesCount`. pipesCount: { get() { return this.pipes.length; } }, + // Legacy property for `paused`. paused: { get() { return this[kPaused] !== false;