diff --git a/lib/common/reset-search-paths.js b/lib/common/reset-search-paths.js index bdd2125d5b4..72449559b22 100644 --- a/lib/common/reset-search-paths.js +++ b/lib/common/reset-search-paths.js @@ -20,7 +20,9 @@ Module._nodeModulePaths = function (from) { const paths = [] const parts = from.split(splitRe) - for (let tip = i = parts.length - 1; i >= 0; tip = i += -1) { + let tip + let i + for (tip = i = parts.length - 1; i >= 0; tip = i += -1) { const part = parts[tip] if (part === 'node_modules') { continue