From f2faa8c32e918b3b843005f0419608b8e158998d Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 13 Jul 2020 15:33:10 -0700 Subject: [PATCH] fix: do not fail if no process (#1440) --- src/util/minimal.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/minimal.js b/src/util/minimal.js index 41f327c2f..559aac7c9 100644 --- a/src/util/minimal.js +++ b/src/util/minimal.js @@ -52,7 +52,9 @@ util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next * * @type {boolean} * @const */ -util.isNode = Boolean(process && process.versions && process.versions.node); +util.isNode = Boolean(typeof process !== "undefined" && process && + typeof process.versions !== "undefined" && process.versions && + process.versions.node); /** * Tests if the specified value is an integer.