We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd0ec1a commit 7e3b871Copy full SHA for 7e3b871
lib/internal/url.js
@@ -284,9 +284,9 @@ class URLSearchParamsIterator {
284
const isKey = ((i - index) % 2) === 0;
285
if (this.#kind === 'key') {
286
if (isKey) ArrayPrototypePush(output, values[i]);
287
- } else if (this.#kind === 'value') {
288
- if (!isKey) ArrayPrototypePush(output, values[i]);
289
- } else if (!isKey) ArrayPrototypePush(output, [values[i - 1], values[i]]);
+ } else if (!isKey) {
+ ArrayPrototypePush(output, this.#kind === 'value' ? values[i] : [values[i - 1], values[i]]);
+ }
290
}
291
const hasBreak = StringPrototypeIncludes(inspect(output, innerOpts), '\n');
292
const outputStrs = ArrayPrototypeMap(output, (p) => inspect(p, innerOpts));
0 commit comments