From 30ef8e4cbdb70c32c0e91ff131607714313047d4 Mon Sep 17 00:00:00 2001 From: Maria Emmanouil Date: Tue, 12 Nov 2019 17:11:14 +0200 Subject: [PATCH] http2: change var to let compact.js PR-URL: https://github.com/nodejs/node/pull/30392 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat --- lib/internal/http2/compat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/http2/compat.js b/lib/internal/http2/compat.js index 5bc64504cd3d74..86d60ce6435a53 100644 --- a/lib/internal/http2/compat.js +++ b/lib/internal/http2/compat.js @@ -526,7 +526,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]); } @@ -610,7 +610,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];