1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-13 01:58:44 +02:00

fix node check

This commit is contained in:
Kyle Spearrin 2018-05-31 09:13:38 -04:00
parent f618c0b5ee
commit 79f8370f7c

View File

@ -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;
}