0
0
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:
Tobias Nießen 2018-01-30 23:40:29 +01:00
parent 312414662b
commit 26ce1ae647
No known key found for this signature in database
GPG Key ID: 718207F8FD156B70

View File

@ -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('..');
}
}