From ff0069dc3e7b6ac6b52b75654595bcedc9782cda Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 17 Jan 2022 08:54:01 -0800 Subject: [PATCH] doc: adjust assignment in condition in stream doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Antoine du Hamel --- 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 966c69c5117022..f6cd6a5f05d257 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -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); } });