Skip to content

Commit 72307cf

Browse files
Trottthedull
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: nodejs#41510 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 458d24d commit 72307cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/stream.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ readable.on('readable', function() {
10351035
// There is some data to read now.
10361036
let data;
10371037

1038-
while (data = this.read()) {
1038+
while ((data = this.read()) !== null) {
10391039
console.log(data);
10401040
}
10411041
});

0 commit comments

Comments
 (0)