diff --git a/lib/url.js b/lib/url.js index 2cc4488a3edfd9..6562be5d8302e6 100644 --- a/lib/url.js +++ b/lib/url.js @@ -880,7 +880,7 @@ Url.prototype.resolveObject = function resolveObject(relative) { // if the path is allowed to go above the root, restore leading ..s if (!mustEndAbs && !removeAllDots) { - for (; up--; up) { + while (up--) { srcPath.unshift('..'); } }