Skip to content

Commit 23ef22b

Browse files
authored
fix(utils): use correct typeof URL validation (#10028)
1 parent e5f3428 commit 23ef22b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/utils/src/requestdata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ function extractQueryParams(
365365
try {
366366
return (
367367
req.query ||
368-
(typeof URL !== undefined && new URL(originalUrl).search.slice(1)) ||
368+
(typeof URL !== 'undefined' && new URL(originalUrl).search.slice(1)) ||
369369
// In Node 8, `URL` isn't in the global scope, so we have to use the built-in module from Node
370370
(deps && deps.url && deps.url.parse(originalUrl).query) ||
371371
undefined

0 commit comments

Comments
 (0)