Skip to content

Commit d0efaf2

Browse files
committed
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 a1b9d7f commit d0efaf2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/internal/url.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1391,8 +1391,7 @@ function pathToFileURL(filepath) {
13911391
}
13921392

13931393
function isURLInstance(fileURLOrPath) {
1394-
return fileURLOrPath != null && fileURLOrPath[searchParams] &&
1395-
fileURLOrPath[searchParams][searchParams];
1394+
return fileURLOrPath != null && fileURLOrPath.href && fileURLOrPath.origin;
13961395
}
13971396

13981397
function toPathIfFileURL(fileURLOrPath) {

0 commit comments

Comments
 (0)