Skip to content

Commit e6829c6

Browse files
committed
destructure
1 parent 417aa81 commit e6829c6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/browser/src/integrations/globalhandlers.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,24 +80,24 @@ function _installGlobalOnErrorHandler(hub: Hub, attachStacktrace: boolean | unde
8080
if (!hub.getIntegration(GlobalHandlers)) {
8181
return;
8282
}
83-
const error = data.error;
83+
const { msg, url, line, column, error } = data;
8484
const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;
8585

8686
if (shouldIgnoreOnError() || isFailedOwnDelivery) {
8787
return;
8888
}
8989

9090
const event =
91-
error === undefined && isString(data.msg)
92-
? _eventFromIncompleteOnError(data.msg, data.url, data.line, data.column)
91+
error === undefined && isString(msg)
92+
? _eventFromIncompleteOnError(msg, url, line, column)
9393
: _enhanceEventWithInitialFrame(
94-
eventFromUnknownInput(error || data.msg, undefined, {
94+
eventFromUnknownInput(error || msg, undefined, {
9595
attachStacktrace,
9696
rejection: false,
9797
}),
98-
data.url,
99-
data.line,
100-
data.column,
98+
url,
99+
line,
100+
column,
101101
);
102102

103103
addMechanismAndCapture(hub, error, event, 'onerror');

0 commit comments

Comments
 (0)