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 committed Jan 17, 2022
1 parent d0d8320 commit 8cba65f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/stream.md
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 8cba65f

Please sign in to comment.