File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ util.pool = require("@protobufjs/pool");
2626util . LongBits = require ( "./longbits" ) ;
2727
2828// global object reference
29- util . global = typeof window !== "undefined" && window
30- || typeof global !== "undefined" && global
29+ util . global = typeof global !== "undefined" && Object . prototype . toString . call ( global ) === "[object global]" && global
30+ || typeof window !== "undefined" && window
3131 || typeof self !== "undefined" && self
3232 || this ; // eslint-disable-line no-invalid-this
3333
@@ -52,9 +52,7 @@ util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next *
5252 * @type {boolean }
5353 * @const
5454 */
55- util . isNode = Boolean ( typeof process !== "undefined" && process &&
56- typeof process . versions !== "undefined" && process . versions &&
57- process . versions . node ) ;
55+ util . isNode = Boolean ( util . global . process && util . global . process . versions && util . global . process . versions . node ) ;
5856
5957/**
6058 * Tests if the specified value is an integer.
You can’t perform that action at this time.
0 commit comments