Skip to content

Commit

Permalink
fix(node): Ensure that self._handler exists before calling it in Link…
Browse files Browse the repository at this point in the history
…edErrors (#5497)

Bring back a definedness check for `self._handler` in the global event processor of the LinkedErrors integration for Node. 
The check was removed in #4902 but apparently it is still necessary.
  • Loading branch information
Lms24 authored Aug 1, 2022
1 parent 7a0dc54 commit 101a023
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/node/src/integrations/linkederrors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class LinkedErrors implements Integration {
const hub = getCurrentHub();
const self = hub.getIntegration(LinkedErrors);
const client = hub.getClient<NodeClient>();
if (client && self) {
if (client && self && self._handler && typeof self._handler === 'function') {
await self._handler(client.getOptions().stackParser, event, hint);
}
return event;
Expand Down

0 comments on commit 101a023

Please sign in to comment.