@sentry/browser 6.14.2 → 6.14.3

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.
package/build/bundle.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @sentry/browser 6.14.2 (9a623dd) | https://github.com/getsentry/sentry-javascript */
1
+ /*! @sentry/browser 6.14.3 (3807d99) | https://github.com/getsentry/sentry-javascript */
2
2
  var Sentry = (function (exports) {
3
3
  /*! *****************************************************************************
4
4
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -336,7 +336,7 @@ var Sentry = (function (exports) {
336
336
  return Object.prototype.toString.call(wat) === '[object DOMException]';
337
337
  }
338
338
  /**
339
- * Checks whether the given value's type is string
339
+ * Checks whether given value's type is a string
340
340
  * {@link isString}.
341
341
  *
342
342
  * @param wat A value to be checked.
@@ -1185,9 +1185,10 @@ var Sentry = (function (exports) {
1185
1185
  * Given any object, return the new object with removed keys that value was `undefined`.
1186
1186
  * Works recursively on objects and arrays.
1187
1187
  */
1188
- function dropUndefinedKeys(obj) {
1188
+ function dropUndefinedKeys(val) {
1189
1189
  var e_1, _a;
1190
- if (isPlainObject(obj)) {
1190
+ if (isPlainObject(val)) {
1191
+ var obj = val;
1191
1192
  var rv = {};
1192
1193
  try {
1193
1194
  for (var _b = __values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {
@@ -1206,10 +1207,10 @@ var Sentry = (function (exports) {
1206
1207
  }
1207
1208
  return rv;
1208
1209
  }
1209
- if (Array.isArray(obj)) {
1210
- return obj.map(dropUndefinedKeys);
1210
+ if (Array.isArray(val)) {
1211
+ return val.map(dropUndefinedKeys);
1211
1212
  }
1212
- return obj;
1213
+ return val;
1213
1214
  }
1214
1215
 
1215
1216
  /**
@@ -4557,7 +4558,7 @@ var Sentry = (function (exports) {
4557
4558
  hub.bindClient(client);
4558
4559
  }
4559
4560
 
4560
- var SDK_VERSION = '6.14.2';
4561
+ var SDK_VERSION = '6.14.3';
4561
4562
 
4562
4563
  var originalFunctionToString;
4563
4564
  /** Patch toString calls to return proper name for wrapped functions */
@@ -5150,10 +5151,11 @@ var Sentry = (function (exports) {
5150
5151
  function eventFromUnknownInput(exception, syntheticException, options) {
5151
5152
  if (options === void 0) { options = {}; }
5152
5153
  var event;
5153
- if (isErrorEvent(exception)) {
5154
+ if (isErrorEvent(exception) && exception.error) {
5154
5155
  // If it is an ErrorEvent with `error` property, extract it to get actual Error
5156
+ var errorEvent = exception;
5155
5157
  // eslint-disable-next-line no-param-reassign
5156
- exception = exception.error;
5158
+ exception = errorEvent.error;
5157
5159
  event = eventFromStacktrace(computeStackTrace(exception));
5158
5160
  return event;
5159
5161
  }