Skip to content
Permalink
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 <fenster@google.com>
  • Loading branch information
diegoblattner and alexander-fenster committed May 29, 2020
1 parent 192f5f1 commit 5564e7b5f07d3eab99762528e8ce88507af5a5a3
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/util/minimal.js
@@ -52,7 +52,7 @@ util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next *
* @type {boolean}
* @const
*/
util.isNode = Boolean(util.global.process && util.global.process.versions && util.global.process.versions.node);
util.isNode = Boolean(process && process.versions && process.versions.node);

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

0 comments on commit 5564e7b

Please sign in to comment.