Skip to content

Commit

Permalink
doc: adjust assignment in condition in stream doc
Browse files Browse the repository at this point in the history
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 <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
Trott authored and thedull committed Jan 18, 2022
1 parent 458d24d commit 72307cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ readable.on('readable', function() {
// There is some data to read now.
let data;

while (data = this.read()) {
while ((data = this.read()) !== null) {
console.log(data);
}
});
Expand Down

0 comments on commit 72307cf

Please sign in to comment.