Skip to content

Commit e2bf688

Browse files
rozzillaaduh95
authored andcommitted
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: #66872 Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
1 parent 5848a08 commit e2bf688

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/internal/url.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ class URLSearchParams {
624624
const { length } = list;
625625
for (let i = 0; i < length; i += 2) {
626626
if (list[i] === name) {
627-
ArrayPrototypePush(values, list[i + 1]);
627+
values[values.length] = list[i + 1];
628628
}
629629
}
630630
return values;

0 commit comments

Comments
 (0)