message: ref: Access window.location first before trying document.location
diff: @@ -1636,15 +1636,15 @@ Raven.prototype = {
  };
  }
  - if (this._hasDocument) {
  - if (_document.location && _document.location.href) {
  - httpData.url = _document.location.href;
  + // Check in `window` instead of `document`, as we may be in ServiceWorker environment
  + if (_window.location && _window.location.href) {
  + httpData.url = _window.location.href;
  }
  - if (_document.referrer) {
  +
  + if (this._hasDocument && _document.referrer) {
  if (!httpData.headers) httpData.headers = {};
  httpData.headers.Referer = _document.referrer;
  }
  - }
  return httpData;
  },
  