Skip to content

Commit 4efc5f6

Browse files
committed
lib: use non-symbols in isURLInstance check
PR-URL: #34622 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 5b5f5f9 commit 4efc5f6

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
@@ -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)