mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
url: simplify loop in parser
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
312414662b
commit
26ce1ae647
@ -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('..');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user