Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public install(): void {
configureScope(scope => {
scope.addEventProcessor(async (currentEvent: SentryEvent) => {
// Juuust in case something goes wrong
try {
if (this.shouldDropEvent(currentEvent, this.previousEvent)) {
return null;
}
} catch (_oO) {
return (this.previousEvent = currentEvent);
}
return (this.previousEvent = currentEvent);
});
});
}