Skip to content

Commit

Permalink
lib: change var to let in stream_base_commons
Browse files Browse the repository at this point in the history
PR-URL: #30426
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
marquicodes authored and addaleax committed Nov 30, 2019
1 parent 3c041ed commit d024630
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/internal/stream_base_commons.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d024630

Please sign in to comment.