We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a0565f commit 36ec575Copy full SHA for 36ec575
packages/browser/src/integrations/helpers.ts
@@ -86,11 +86,15 @@ export function wrap(
86
}
87
};
88
89
- for (const property in fn) {
90
- if (Object.prototype.hasOwnProperty.call(fn, property)) {
91
- wrapped[property] = fn[property];
+ // Accessing some objects may throw
+ // ref: https://github.com/getsentry/sentry-javascript/issues/1168
+ try {
92
+ for (const property in fn) {
93
+ if (Object.prototype.hasOwnProperty.call(fn, property)) {
94
+ wrapped[property] = fn[property];
95
+ }
96
- }
97
+ } catch (_oO) {} // tslint:disable-line:no-empty
98
99
wrapped.prototype = fn.prototype;
100
fn.__sentry_wrapper__ = wrapped;
0 commit comments