@sentry/replay 7.73.0 → 7.74.1

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/cjs/index.js CHANGED
@@ -2720,7 +2720,9 @@ function initAdoptedStyleSheetObserver({ mirror, stylesheetManager, }, host) {
2720
2720
  const patchTarget = host.nodeName === '#document'
2721
2721
  ? (_a = host.defaultView) === null || _a === void 0 ? void 0 : _a.Document
2722
2722
  : (_c = (_b = host.ownerDocument) === null || _b === void 0 ? void 0 : _b.defaultView) === null || _c === void 0 ? void 0 : _c.ShadowRoot;
2723
- const originalPropertyDescriptor = Object.getOwnPropertyDescriptor(patchTarget === null || patchTarget === void 0 ? void 0 : patchTarget.prototype, 'adoptedStyleSheets');
2723
+ const originalPropertyDescriptor = (patchTarget === null || patchTarget === void 0 ? void 0 : patchTarget.prototype)
2724
+ ? Object.getOwnPropertyDescriptor(patchTarget === null || patchTarget === void 0 ? void 0 : patchTarget.prototype, 'adoptedStyleSheets')
2725
+ : undefined;
2724
2726
  if (hostId === null ||
2725
2727
  hostId === -1 ||
2726
2728
  !patchTarget ||
@@ -9837,13 +9839,11 @@ class Replay {
9837
9839
  collectFonts: true,
9838
9840
  errorHandler: (err) => {
9839
9841
  try {
9840
- // @ts-expect-error Set this so that replay SDK can ignore errors originating from rrweb
9841
9842
  err.__rrweb__ = true;
9842
- } catch (e) {
9843
- // avoid any potential hazards here
9843
+ } catch (error) {
9844
+ // ignore errors here
9845
+ // this can happen if the error is frozen or does not allow mutation for other reasons
9844
9846
  }
9845
- // return true to suppress throwing the error inside of rrweb
9846
- return true;
9847
9847
  },
9848
9848
  };
9849
9849