Skip to content

Commit 101a023

Browse files
authored
fix(node): Ensure that self._handler exists before calling it in LinkedErrors (#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.
1 parent 7a0dc54 commit 101a023

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/node/src/integrations/linkederrors.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class LinkedErrors implements Integration {
4747
const hub = getCurrentHub();
4848
const self = hub.getIntegration(LinkedErrors);
4949
const client = hub.getClient<NodeClient>();
50-
if (client && self) {
50+
if (client && self && self._handler && typeof self._handler === 'function') {
5151
await self._handler(client.getOptions().stackParser, event, hint);
5252
}
5353
return event;

0 commit comments

Comments
 (0)