Skip to content

Commit 5564e7b

Browse files
fix: updated isNode check (#1221) (#1363)
* Fixes #1221 when used within SSR. `process` is a global variable since node [0.1.7](https://nodejs.org/api/globals.html#globals_process) and versions since [0.2.0](https://nodejs.org/api/process.html#process_process_versions). Co-authored-by: Alexander Fenster <[email protected]>
1 parent 192f5f1 commit 5564e7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/minimal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next *
5252
* @type {boolean}
5353
* @const
5454
*/
55-
util.isNode = Boolean(util.global.process && util.global.process.versions && util.global.process.versions.node);
55+
util.isNode = Boolean(process && process.versions && process.versions.node);
5656

5757
/**
5858
* Tests if the specified value is an integer.

0 commit comments

Comments
 (0)