From 63bc468365bceda929a39b5eb93b605e2dc2bd9c Mon Sep 17 00:00:00 2001 From: "Masahiro Miyashiro (3846masa)" <3846masahiro@gmail.com> Date: Mon, 18 May 2020 00:37:16 +0900 Subject: Fix definition of URL constructor (#5521) --- std/path/win32.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'std/path/win32.ts') diff --git a/std/path/win32.ts b/std/path/win32.ts index 0557b3768..eafddd138 100644 --- a/std/path/win32.ts +++ b/std/path/win32.ts @@ -908,7 +908,7 @@ export function parse(path: string): ParsedPath { * are ignored. */ export function fromFileUrl(url: string | URL): string { - return new URL(url).pathname + return new URL(url.toString()).pathname .replace(/^\/*([A-Za-z]:)(\/|$)/, "$1/") .replace(/\//g, "\\"); } -- cgit v1.2.3