diff --git a/lib/common/utils.ts b/lib/common/utils.ts index 50bd721a4..a1227cb23 100644 --- a/lib/common/utils.ts +++ b/lib/common/utils.ts @@ -45,7 +45,7 @@ export const isWebWorker: boolean = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope); export const isNode: boolean = - (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'); + (!('nw' in _global) && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'); export const isBrowser: boolean = !isNode && !isWebWorker && !!(typeof window !== 'undefined' && window['HTMLElement']); @@ -418,4 +418,4 @@ export function patchMethod( proto[name] = createNamedFn(name, patchFn(delegate, delegateName, name)); } return delegate; -} \ No newline at end of file +}