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 <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • 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.