There was an error while loading. Please reload this page.
1 parent 09056fd commit 176f8c3Copy full SHA for 176f8c3
1 file changed
lib/internal/url.js
@@ -1394,8 +1394,7 @@ function pathToFileurl(/sitelet?url=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fcommit%2Ffilepath) {
1394
}
1395
1396
function isURLInstance(fileURLOrPath) {
1397
- return fileURLOrPath != null && fileURLOrPath[searchParams] &&
1398
- fileURLOrPath[searchParams][searchParams];
+ return fileURLOrPath != null && fileURLOrPath.href && fileURLOrPath.origin;
1399
1400
1401
function toPathIfFileURL(fileURLOrPath) {
0 commit comments