summaryrefslogtreecommitdiff
path: root/std/path/win32.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-07-06 17:39:13 -0400
committerGitHub <noreply@github.com>2020-07-06 17:39:13 -0400
commit5c43131be1a36671fd564b82709e11dff66488f3 (patch)
tree7a1f0b44e74083d36078cfb8718db60e94465825 /std/path/win32.ts
parentdbc2372cdea4702d05fb29023effdb552ecb5756 (diff)
Fix definition of URL constructor (#6653)
Diffstat (limited to 'std/path/win32.ts')
-rw-r--r--std/path/win32.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/std/path/win32.ts b/std/path/win32.ts
index 8e438a79c..bac43a61a 100644
--- a/std/path/win32.ts
+++ b/std/path/win32.ts
@@ -914,7 +914,7 @@ export function parse(path: string): ParsedPath {
* are ignored.
*/
export function fromFileUrl(url: string | URL): string {
- return new URL(url).pathname
+ return new URL(String(url)).pathname
.replace(/^\/*([A-Za-z]:)(\/|$)/, "$1/")
.replace(/\//g, "\\");
}