From 89db1fe492a028a14082dba140779d072f4fab20 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 13 Jan 2022 17:46:46 -0800 Subject: [PATCH] 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. --- doc/api/stream.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 1f7f679e3ba5a4..2b32e275a95cbc 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); } });