Skip to content

Commit

Permalink
fixup! doc: remove assignment in condition in stream doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed Jan 14, 2022
1 parent a6a237b commit 04c0a04
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -1033,11 +1033,10 @@ available, [`stream.read()`][stream-read] will return that data.
const readable = getReadableStreamSomehow();
readable.on('readable', function() {
// There is some data to read now.
let data = this.read();
let data;

while (data) {
while ((data = this.read()) !== null) {
console.log(data);
data = this.read();
}
});
```
Expand Down

0 comments on commit 04c0a04

Please sign in to comment.