diff --git a/polyfills/url.js b/polyfills/url.js index 076dd8b..d069271 100644 --- a/polyfills/url.js +++ b/polyfills/url.js @@ -380,7 +380,7 @@ function parse(self, url, parseQueryString, slashesDenoteHost) { function urlFileURLToPath(path) { if (typeof path === 'string') path = new Url().parse(path); - else if (!(url instanceof Url)) + else if (!(path instanceof Url)) throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type ' + (typeof path) + String(path)); if (path.protocol !== 'file:') throw new TypeError('The URL must be of scheme file');