@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.
@@ -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
  /** Console logging verbosity for the SDK. */
4
4
  var LogLevel;
@@ -252,7 +252,7 @@ var Sentry = (function (exports) {
252
252
  return Object.prototype.toString.call(wat) === '[object DOMException]';
253
253
  }
254
254
  /**
255
- * Checks whether the given value's type is string
255
+ * Checks whether given value's type is a string
256
256
  * {@link isString}.
257
257
  *
258
258
  * @param wat A value to be checked.
@@ -1074,8 +1074,9 @@ var Sentry = (function (exports) {
1074
1074
  * Given any object, return the new object with removed keys that value was `undefined`.
1075
1075
  * Works recursively on objects and arrays.
1076
1076
  */
1077
- function dropUndefinedKeys(obj) {
1078
- if (isPlainObject(obj)) {
1077
+ function dropUndefinedKeys(val) {
1078
+ if (isPlainObject(val)) {
1079
+ const obj = val;
1079
1080
  const rv = {};
1080
1081
  for (const key of Object.keys(obj)) {
1081
1082
  if (typeof obj[key] !== 'undefined') {
@@ -1084,10 +1085,10 @@ var Sentry = (function (exports) {
1084
1085
  }
1085
1086
  return rv;
1086
1087
  }
1087
- if (Array.isArray(obj)) {
1088
- return obj.map(dropUndefinedKeys);
1088
+ if (Array.isArray(val)) {
1089
+ return val.map(dropUndefinedKeys);
1089
1090
  }
1090
- return obj;
1091
+ return val;
1091
1092
  }
1092
1093
 
1093
1094
  /**
@@ -4360,7 +4361,7 @@ var Sentry = (function (exports) {
4360
4361
  hub.bindClient(client);
4361
4362
  }
4362
4363
 
4363
- const SDK_VERSION = '6.14.2';
4364
+ const SDK_VERSION = '6.14.3';
4364
4365
 
4365
4366
  let originalFunctionToString;
4366
4367
  /** Patch toString calls to return proper name for wrapped functions */
@@ -4958,10 +4959,11 @@ var Sentry = (function (exports) {
4958
4959
  */
4959
4960
  function eventFromUnknownInput(exception, syntheticException, options = {}) {
4960
4961
  let event;
4961
- if (isErrorEvent(exception)) {
4962
+ if (isErrorEvent(exception) && exception.error) {
4962
4963
  // If it is an ErrorEvent with `error` property, extract it to get actual Error
4964
+ const errorEvent = exception;
4963
4965
  // eslint-disable-next-line no-param-reassign
4964
- exception = exception.error;
4966
+ exception = errorEvent.error;
4965
4967
  event = eventFromStacktrace(computeStackTrace(exception));
4966
4968
  return event;
4967
4969
  }