From dd8a10948195f231a6a9eb652e3f208813904ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 21 Feb 2020 10:36:13 -0500 Subject: refactor: remove unneeded ErrorKinds (#3936) --- std/node/module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'std/node/module.ts') 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; -- cgit v1.2.3