From 79f8370f7c37104f3f207dc36d2d0c55ac73f55c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 31 May 2018 09:13:38 -0400 Subject: [PATCH] fix node check --- src/misc/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/misc/utils.ts b/src/misc/utils.ts index 3ca7ffefdf..bd90f0d1e9 100644 --- a/src/misc/utils.ts +++ b/src/misc/utils.ts @@ -13,7 +13,8 @@ export class Utils { } Utils.inited = true; - Utils.isNode = typeof process !== 'undefined' && (process as any).release.name === 'node'; + Utils.isNode = typeof process !== 'undefined' && (process as any).release != null && + (process as any).release.name === 'node'; Utils.isBrowser = typeof window !== 'undefined'; Utils.global = Utils.isNode && !Utils.isBrowser ? global : window; }