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'; }