Skip to content

Commit

Permalink
stream: fix Readable stream state properties
Browse files Browse the repository at this point in the history
Looks like they have been accidentally moved in
#31144.

PR-URL: #34886
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
  • Loading branch information
lundibundi authored and richardlau committed Sep 2, 2020
1 parent 0b2c516 commit 098711e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1176,13 +1176,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;
Expand Down

0 comments on commit 098711e

Please sign in to comment.