From ab961ef50c5ee7177d846f28cd13adcf0d831ad7 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 4 Aug 2020 09:13:09 -0700 Subject: [PATCH] lib: use non-symbols in isURLInstance check --- lib/internal/url.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/internal/url.js b/lib/internal/url.js index 7c2637246e9b51..b65e2cb9b14e4c 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -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) {