Skip to content

Commit

Permalink
url: simplify loop in parser
Browse files Browse the repository at this point in the history
PR-URL: nodejs#18468
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
tniessen committed Jan 31, 2018
1 parent 3124146 commit 26ce1ae
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 26ce1ae

Please sign in to comment.