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 Mar 30, 2018
1 parent 142ad8d commit 5d03c82
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 @@ -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('..');
}
}
Expand Down

0 comments on commit 5d03c82

Please sign in to comment.