Skip to content

Commit

Permalink
lib: use non-symbols in isURLInstance check
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Aug 4, 2020
1 parent 90ee98a commit ab961ef
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 ab961ef

Please sign in to comment.