Skip to content

Commit

Permalink
fix(utils): use correct typeof URL validation (#10028)
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig authored Jan 3, 2024
1 parent e5f3428 commit 23ef22b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/utils/src/requestdata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ function extractQueryParams(
try {
return (
req.query ||
(typeof URL !== undefined && new URL(originalUrl).search.slice(1)) ||
(typeof URL !== 'undefined' && new URL(originalUrl).search.slice(1)) ||
// In Node 8, `URL` isn't in the global scope, so we have to use the built-in module from Node
(deps && deps.url && deps.url.parse(originalUrl).query) ||
undefined
Expand Down

0 comments on commit 23ef22b

Please sign in to comment.