Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2022-01-17 19:54:01 +0300
committerGitHub <noreply@github.com>2022-01-17 19:54:01 +0300
commit8cba65f61afe35228938c04b2c8527897366f689 (patch)
tree119f3fee9be508cacdef4ef9c75024968c541b24 /doc/api/stream.md
parentd0d8320de74b32e3586d706fed4ba572ad47ceff (diff)
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: https://github.com/nodejs/node/pull/41510 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to 'doc/api/stream.md')
-rw-r--r--doc/api/stream.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md
index bd4573e487f..77afb18ff56 100644
--- a/doc/api/stream.md
+++ b/doc/api/stream.md
@@ -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);
}
});