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: #41510
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
Trott authored and BethGriggs committed Jan 24, 2022
1 parent 5c700fa commit cb4dbc1
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 @@ -1002,7 +1002,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 cb4dbc1

Please sign in to comment.