Skip to content

Commit

Permalink
stream: replace var with let
Browse files Browse the repository at this point in the history
PR-URL: #30379
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
daern91 authored and BridgeAR committed Nov 19, 2019
1 parent 592d51c commit 4524c7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/streams/end-of-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ function eos(stream, opts, callback) {
if (!stream.writable) onfinish();
};

var writableEnded = stream._writableState && stream._writableState.finished;
let writableEnded = stream._writableState && stream._writableState.finished;
const onfinish = () => {
writable = false;
writableEnded = true;
if (!readable) callback.call(stream);
};

var readableEnded = stream.readableEnded ||
let readableEnded = stream.readableEnded ||
(stream._readableState && stream._readableState.endEmitted);
const onend = () => {
readable = false;
Expand Down

0 comments on commit 4524c7a

Please sign in to comment.