diff --git a/lib/internal/streams/buffer_list.js b/lib/internal/streams/buffer_list.js index 715d5d201d4df4..5e23f2cf464f6c 100644 --- a/lib/internal/streams/buffer_list.js +++ b/lib/internal/streams/buffer_list.js @@ -48,8 +48,8 @@ module.exports = class BufferList { join(s) { if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; + let p = this.head; + let ret = '' + p.data; while (p = p.next) ret += s + p.data; return ret; @@ -59,8 +59,8 @@ module.exports = class BufferList { if (this.length === 0) return Buffer.alloc(0); const ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; + let p = this.head; + let i = 0; while (p) { ret.set(p.data, i); i += p.data.length; diff --git a/lib/internal/streams/legacy.js b/lib/internal/streams/legacy.js index 06e48e8b15d839..062eabec3890c0 100644 --- a/lib/internal/streams/legacy.js +++ b/lib/internal/streams/legacy.js @@ -36,7 +36,7 @@ Stream.prototype.pipe = function(dest, options) { source.on('close', onclose); } - var didOnEnd = false; + let didOnEnd = false; function onend() { if (didOnEnd) return; didOnEnd = true;