Skip to content

Commit 7e3b871

Browse files
gurgundayaduh95
andauthored
apply suggestion
Co-authored-by: Antoine du Hamel <[email protected]>
1 parent cd0ec1a commit 7e3b871

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/internal/url.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,9 @@ class URLSearchParamsIterator {
284284
const isKey = ((i - index) % 2) === 0;
285285
if (this.#kind === 'key') {
286286
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]]);
287+
} else if (!isKey) {
288+
ArrayPrototypePush(output, this.#kind === 'value' ? values[i] : [values[i - 1], values[i]]);
289+
}
290290
}
291291
const hasBreak = StringPrototypeIncludes(inspect(output, innerOpts), '\n');
292292
const outputStrs = ArrayPrototypeMap(output, (p) => inspect(p, innerOpts));

0 commit comments

Comments
 (0)