Skip to content
Permalink
Browse files

lib: change var to let in stream_base_commons

PR-URL: #30426
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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
marquicodes authored and MylesBorins committed Nov 12, 2019
1 parent e72be52 commit dc786c331569da6fac6dfe6766e4cf87438759ad
Showing with 4 additions and 5 deletions.
  1. +4 −5 lib/internal/stream_base_commons.js
@@ -111,16 +111,15 @@ function createWriteWrap(handle) {
function writevGeneric(self, data, cb) {
const req = createWriteWrap(self[kHandle]);
const allBuffers = data.allBuffers;
var chunks;
var i;
let chunks;
if (allBuffers) {
chunks = data;
for (i = 0; i < data.length; i++)
for (let i = 0; i < data.length; i++)
data[i] = data[i].chunk;
} else {
chunks = new Array(data.length << 1);
for (i = 0; i < data.length; i++) {
var entry = data[i];
for (let i = 0; i < data.length; i++) {
const entry = data[i];
chunks[i * 2] = entry.chunk;
chunks[i * 2 + 1] = entry.encoding;
}

0 comments on commit dc786c3

Please sign in to comment.
You can’t perform that action at this time.