Skip to content

Commit cd98b89

Browse files
committed
try revert??
1 parent 4d80820 commit cd98b89

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

packages/node/src/integrations/contextlines.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,14 @@ export class ContextLines implements Integration {
5555
/**
5656
* @inheritDoc
5757
*/
58-
public setupOnce(_addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {
59-
// noop
60-
}
61-
62-
/** @inheritDoc */
63-
public processEvent(event: Event): Promise<Event> {
64-
return this.addSourceContext(event);
58+
public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {
59+
addGlobalEventProcessor(event => {
60+
const self = getCurrentHub().getIntegration(ContextLines);
61+
if (!self) {
62+
return event;
63+
}
64+
return this.addSourceContext(event);
65+
});
6566
}
6667

6768
/** Processes an event and adds context lines */

0 commit comments

Comments
 (0)