Skip to content

Commit

Permalink
lib: use non-symbols in isURLInstance check
Browse files Browse the repository at this point in the history
PR-URL: #34622
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
codebytere authored and Trott committed Aug 9, 2020
1 parent bdfc598 commit 8825eb4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/internal/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8825eb4

Please sign in to comment.