diff options
Diffstat (limited to 'std/path/glob.ts')
-rw-r--r-- | std/path/glob.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/std/path/glob.ts b/std/path/glob.ts index daee22f98..a079f448f 100644 --- a/std/path/glob.ts +++ b/std/path/glob.ts @@ -1,6 +1,8 @@ import { SEP, SEP_PATTERN } from "./constants.ts"; import { globrex } from "./globrex.ts"; import { join, normalize } from "./mod.ts"; +import { assert } from "../testing/asserts.ts"; + const { DenoError, ErrorKind } = Deno; export interface GlobOptions { @@ -46,7 +48,8 @@ export function globToRegExp( strict: false, filepath: true }); - return result.path!.regex; + assert(result.path != null); + return result.path.regex; } /** Test whether the given string is a glob */ |