Skip to content

Commit 7c538ab

Browse files
authored
fix(browser): Make sure handler exists for LinkedErrors Integration (#3861)
We should port the fixes done in the Node SDK in #2742 to the browser SDK. This makes sure that the handler class method is defined in the linked errors integration.
1 parent c35aa3b commit 7c538ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/browser/src/integrations/linkederrors.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export class LinkedErrors implements Integration {
4545
addGlobalEventProcessor((event: Event, hint?: EventHint) => {
4646
const self = getCurrentHub().getIntegration(LinkedErrors);
4747
if (self) {
48-
return self._handler(event, hint);
48+
const handler = self._handler && self._handler.bind(self);
49+
return typeof handler === 'function' ? handler(event, hint) : event;
4950
}
5051
return event;
5152
});

0 commit comments

Comments
 (0)