Skip to content

Commit 8825eb4

Browse files
codebytereTrott
authored andcommitted
lib: use non-symbols in isURLInstance check
PR-URL: #34622 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent bdfc598 commit 8825eb4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/internal/url.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,8 +1390,7 @@ function pathToFileURL(filepath) {
13901390
}
13911391

13921392
function isURLInstance(fileURLOrPath) {
1393-
return fileURLOrPath != null && fileURLOrPath[searchParams] &&
1394-
fileURLOrPath[searchParams][searchParams];
1393+
return fileURLOrPath != null && fileURLOrPath.href && fileURLOrPath.origin;
13951394
}
13961395

13971396
function toPathIfFileURL(fileURLOrPath) {

0 commit comments

Comments
 (0)