mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
url: use indexed appends in search params getAll
Use indexed writes when collecting matching parameter values. This improves getAll throughput without changing result order. Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com> PR-URL: https://github.com/nodejs/node/pull/66872 Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
This commit is contained in:
1 parent
4c8cece947
commit
92bfe9ae4f
1 file changed
+1
-1
+1
-1
@@ -624,7 +624,7 @@ class URLSearchParams {
|
||||
const { length } = list;
|
||||
for (let i = 0; i < length; i += 2) {
|
||||
if (list[i] === name) {
|
||||
ArrayPrototypePush(values, list[i + 1]);
|
||||
values[values.length] = list[i + 1];
|
||||
}
|
||||
}
|
||||
return values;
|
||||
|
||||
Reference in new issue
Block a user