diff --git a/lib/internal/url.js b/lib/internal/url.js index 7055667718beed..0bdfc4783e65f3 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -98,8 +98,7 @@ class URLSearchParams { constructor(init = undefined) { if (init === null || init === undefined) { this[searchParams] = []; - } else if ((typeof init === 'object' && init !== null) || - typeof init === 'function') { + } else if (typeof init === 'object' || typeof init === 'function') { const method = init[Symbol.iterator]; if (method === this[Symbol.iterator]) { // While the spec does not have this branch, we can use it as a