lib: use non-symbols in isURLInstance check
PR-URL: https://github.com/nodejs/node/pull/34622 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
parent
bdfc59893d
commit
8825eb4d73
@ -1390,8 +1390,7 @@ function pathToFileURL(filepath) {
|
||||
}
|
||||
|
||||
function isURLInstance(fileURLOrPath) {
|
||||
return fileURLOrPath != null && fileURLOrPath[searchParams] &&
|
||||
fileURLOrPath[searchParams][searchParams];
|
||||
return fileURLOrPath != null && fileURLOrPath.href && fileURLOrPath.origin;
|
||||
}
|
||||
|
||||
function toPathIfFileURL(fileURLOrPath) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user