From 797b938c49e89ce06d73a023e27219bbfa68bf30 Mon Sep 17 00:00:00 2001 From: Dennis Saenger Date: Tue, 12 Nov 2019 14:55:07 +0000 Subject: [PATCH] lib: replace var with let PR-URL: https://github.com/nodejs/node/pull/30396 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat --- lib/internal/v8_prof_polyfill.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/v8_prof_polyfill.js b/lib/internal/v8_prof_polyfill.js index 7d8d3ff0202d20..33e57835666650 100644 --- a/lib/internal/v8_prof_polyfill.js +++ b/lib/internal/v8_prof_polyfill.js @@ -77,7 +77,7 @@ try { const fd = fs.openSync(logFile, 'r'); const buf = Buffer.allocUnsafe(4096); const dec = new (require('string_decoder').StringDecoder)('utf-8'); -var line = ''; +let line = ''; { const message = versionCheck(peekline(), process.versions.v8); @@ -125,7 +125,7 @@ function versionCheck(firstLine, expected) { return 'Unable to read v8-version from log file.'; } // Compare major, minor and build; ignore the patch and candidate fields. - for (var i = 0; i < 3; i++) + for (let i = 0; i < 3; i++) if (curVer[i] !== firstLine[i + 1]) return 'Testing v8 version different from logging version'; }