From 8b9b00cc047418e08afe479b3e4428c7471a992d Mon Sep 17 00:00:00 2001 From: Trevor Sundberg Date: Fri, 14 Jun 2019 17:38:09 -0700 Subject: [PATCH] fix: check for process --- src/process.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/process.ts b/src/process.ts index b43e74ff7..cedfec36c 100644 --- a/src/process.ts +++ b/src/process.ts @@ -12,7 +12,8 @@ export interface IProcess { }; } -export function createProcess(p: IProcess = process): IProcess { +export function createProcess(): IProcess { + let p: IProcess = typeof process !== 'undefined' && process; if (!p) { try { p = require('process');