Skip to content

Commit

Permalink
url: simplify loop in parser
Browse files Browse the repository at this point in the history
PR-URL: #18468
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
tniessen authored and MylesBorins committed Feb 21, 2018
1 parent 272fd2e commit 07e4ba2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,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('..');
}
}
Expand Down

0 comments on commit 07e4ba2

Please sign in to comment.