Skip to content

Commit

Permalink
http2: change var to let compact.js
Browse files Browse the repository at this point in the history
PR-URL: #30392
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
MariaEmma authored and MylesBorins committed Dec 17, 2019
1 parent 2f8dcef commit cb3e008
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/http2/compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ class Http2ServerResponse extends Stream {
addTrailers(headers) {
const keys = Object.keys(headers);
let key = '';
for (var i = 0; i < keys.length; i++) {
for (let i = 0; i < keys.length; i++) {
key = keys[i];
this.setTrailer(key, headers[key]);
}
Expand Down Expand Up @@ -606,7 +606,7 @@ class Http2ServerResponse extends Stream {
if (headers === undefined && typeof statusMessage === 'object')
headers = statusMessage;

var i;
let i;
if (Array.isArray(headers)) {
for (i = 0; i < headers.length; i++) {
const header = headers[i];
Expand Down

0 comments on commit cb3e008

Please sign in to comment.