Skip to content

Commit ff0069d

Browse files
Trottdanielleadams
authored andcommitted
doc: adjust assignment in condition in stream doc
This is part of an effort to get our code to comply with ESLint no-cond-assign so that we don't have to disable that rule in our config. PR-URL: #41510 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 1128b1c commit ff0069d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/stream.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ readable.on('readable', function() {
10001000
// There is some data to read now.
10011001
let data;
10021002

1003-
while (data = this.read()) {
1003+
while ((data = this.read()) !== null) {
10041004
console.log(data);
10051005
}
10061006
});

0 commit comments

Comments
 (0)