summaryrefslogtreecommitdiff
path: root/std/node/module.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-02-21 10:36:13 -0500
committerGitHub <noreply@github.com>2020-02-21 10:36:13 -0500
commitdd8a10948195f231a6a9eb652e3f208813904ad6 (patch)
treef9a4afeb67bbead882c29c2458a5f1f99e2e42db /std/node/module.ts
parentd9efb8c02a0036d755c35e8e9c88d58bd45a9e2b (diff)
refactor: remove unneeded ErrorKinds (#3936)
Diffstat (limited to 'std/node/module.ts')
-rw-r--r--std/node/module.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/std/node/module.ts b/std/node/module.ts
index 547c76bab..aecf03ede 100644
--- a/std/node/module.ts
+++ b/std/node/module.ts
@@ -57,7 +57,7 @@ function stat(filename: string): StatResult {
if (statCache !== null) statCache.set(filename, result);
return result;
} catch (e) {
- if (e.kind === Deno.ErrorKind.PermissionDenied) {
+ if (e instanceof Deno.Err.PermissionDenied) {
throw new Error("CJS loader requires --allow-read.");
}
return -1;