Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 07e4ba2

Browse filesBrowse files
tniessenMylesBorins
authored andcommitted
url: simplify loop in parser
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>
1 parent 272fd2e commit 07e4ba2
Copy full SHA for 07e4ba2

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎lib/url.js‎

Copy file name to clipboardExpand all lines: lib/url.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ Url.prototype.resolveObject = function resolveObject(relative) {
883883

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.