@honeybadger-io/js 5.1.5-alpha-3 → 5.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -800,7 +800,7 @@
800
800
  var notifier = {
801
801
  name: 'honeybadger-js',
802
802
  url: 'https://github.com/honeybadger-io/honeybadger-js',
803
- version: '5.1.5-alpha'
803
+ version: '5.1.7'
804
804
  };
805
805
  // Split at commas and spaces
806
806
  var TAG_SEPARATOR = /,|\s+/;
@@ -1540,9 +1540,6 @@
1540
1540
  if (!breadcrumbsEnabled('dom')) {
1541
1541
  return;
1542
1542
  }
1543
- if (typeof _window.addEventListener !== 'function') {
1544
- return;
1545
- }
1546
1543
  _window.addEventListener('click', function (event) {
1547
1544
  var message, selector, text;
1548
1545
  try {
@@ -1567,7 +1564,7 @@
1567
1564
  event: event
1568
1565
  }
1569
1566
  });
1570
- }, _window.location ? true : false); // In CloudFlare workers useCapture must be false. window.location is a hacky way to detect it.
1567
+ }, _window.location ? true : false); // In CloudFlare workers useCapture must be false. window.locaiton is a hacky way to detect it.
1571
1568
  })();
1572
1569
  // Breadcrumbs: instrument XMLHttpRequest
1573
1570
  (function () {
@@ -1575,9 +1572,8 @@
1575
1572
  return;
1576
1573
  }
1577
1574
  // Some environments may not support XMLHttpRequest.
1578
- if (typeof XMLHttpRequest === 'undefined') {
1575
+ if (typeof XMLHttpRequest === 'undefined')
1579
1576
  return;
1580
- }
1581
1577
  // -- On xhr.open: capture initial metadata
1582
1578
  instrument$2(XMLHttpRequest.prototype, 'open', function (original) {
1583
1579
  return function () {
@@ -1723,9 +1719,6 @@
1723
1719
  recordUrlChange(lastHref, _window.location.href);
1724
1720
  });
1725
1721
  }
1726
- if (typeof _window.history === 'undefined') {
1727
- return;
1728
- }
1729
1722
  // https://developer.mozilla.org/en-US/docs/Web/API/History/pushState
1730
1723
  // https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
1731
1724
  function historyWrapper(original) {
@@ -2114,9 +2107,7 @@
2114
2107
  HTTP_REFERER: undefined,
2115
2108
  HTTP_COOKIE: undefined
2116
2109
  };
2117
- if (typeof navigator !== 'undefined' && navigator.userAgent) {
2118
- cgiData.HTTP_USER_AGENT = navigator.userAgent;
2119
- }
2110
+ cgiData.HTTP_USER_AGENT = navigator.userAgent;
2120
2111
  if (typeof document !== 'undefined' && document.referrer.match(/\S/)) {
2121
2112
  cgiData.HTTP_REFERER = document.referrer;
2122
2113
  }