message: ref: Check for node-env first and return more accurate global object
diff: import { SentryEvent } from '@sentry/types';
  import { isString } from './is';
  +/**
  + * Checks whether we're in the Node.js or Browser environment
  + *
  + * @returns Answer to given question
  + */
  +export function isNodeEnv(): boolean {
  + // tslint:disable:strict-type-predicates
  + return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
  +}
  +
  /**
  * Safely get global scope object
  *
  @@ -8,13 +18,7 @@ import { isString } from './is';
  */
  // tslint:disable:strict-type-predicates
  export function getGlobalObject(): Window | NodeJS.Global | {} {
  - return typeof window !== 'undefined'
  - ? window
  - : typeof global !== 'undefined'
  - ? global
  - : typeof self !== 'undefined'
  - ? self
  - : {};
  + return isNodeEnv() ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {};
  }
  // tslint:enable:strict-type-predicates
  