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 danielleadams committed Feb 26, 2022
1 parent 1128b1c commit ff0069d
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 @@ -1000,7 +1000,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 ff0069d

Please sign in to comment.