summaryrefslogtreecommitdiff
path: root/std/path/win32.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/path/win32.ts')
-rw-r--r--std/path/win32.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/std/path/win32.ts b/std/path/win32.ts
index 79e04ea6e..11518ee7c 100644
--- a/std/path/win32.ts
+++ b/std/path/win32.ts
@@ -17,6 +17,7 @@ import {
normalizeString,
_format
} from "./utils.ts";
+import { assert } from "../testing/asserts.ts";
export const sep = "\\";
export const delimiter = ";";
@@ -329,7 +330,7 @@ export function join(...paths: string[]): string {
// path.join('//server', 'share') -> '\\\\server\\share\\')
let needsReplace = true;
let slashCount = 0;
- firstPart = firstPart!;
+ assert(firstPart != null);
if (isPathSeparator(firstPart.charCodeAt(0))) {
++slashCount;
const firstLen = firstPart.length;