Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6a3bf3c

Browse files
tniessenMylesBorins
authored andcommittedMar 20, 2018
url: simplify loop in parser
PR-URL: #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]>
1 parent 89fba18 commit 6a3bf3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/url.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ Url.prototype.resolveObject = function resolveObject(relative) {
880880

881881
// if the path is allowed to go above the root, restore leading ..s
882882
if (!mustEndAbs && !removeAllDots) {
883-
for (; up--; up) {
883+
while (up--) {
884884
srcPath.unshift('..');
885885
}
886886
}

0 commit comments

Comments
 (0)
Please sign in to comment.