From 4524c7ad36f8f8d8d2f6fcfe7c6ce7e83de770ab Mon Sep 17 00:00:00 2001 From: daern91 Date: Tue, 12 Nov 2019 14:52:12 +0000 Subject: [PATCH] stream: replace var with let PR-URL: https://github.com/nodejs/node/pull/30379 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Gireesh Punathil Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat --- lib/internal/streams/end-of-stream.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/streams/end-of-stream.js b/lib/internal/streams/end-of-stream.js index 3f1c0f316cd3c6..bb01e800becdf3 100644 --- a/lib/internal/streams/end-of-stream.js +++ b/lib/internal/streams/end-of-stream.js @@ -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;