From c7b6318700583a6ad690136cbd774576c7296080 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 13 Jul 2020 14:42:51 -0700 Subject: [PATCH] fix: do not fail if no process --- 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.