summaryrefslogtreecommitdiff
path: root/std/path/win32.ts
diff options
context:
space:
mode:
authorYusuke Sakurai <kerokerokerop@gmail.com>2020-02-07 16:23:38 +0900
committerGitHub <noreply@github.com>2020-02-07 02:23:38 -0500
commitc2986891f6aac87cec98232735945af756e6643f (patch)
tree716dc739f438bf740fa960b87fc022d569090802 /std/path/win32.ts
parentea6179f7dce89416f1586ee18c2f437e68eabd38 (diff)
remove non-null assertion operator from std (part1) (#3900)
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;