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 committed Aug 9, 2020
1 parent a1b9d7f commit d0efaf2
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 @@ -1391,8 +1391,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 d0efaf2

Please sign in to comment.