Skip to content

Commit 15465a8

Browse files
authored
ref: Remove unnecessary eventID check in offline integration (#2890)
1 parent 3f42a01 commit 15465a8

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

packages/integrations/src/offline.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,11 @@ export class Offline implements Integration {
149149
private async _sendEvents(): Promise<void> {
150150
return this.offlineEventStore.iterate<Event, void>((event: Event, cacheKey: string, _index: number): void => {
151151
if (this.hub) {
152-
const newEventId = this.hub.captureEvent(event);
152+
this.hub.captureEvent(event);
153153

154-
if (newEventId) {
155-
this._purgeEvent(cacheKey).catch((_error): void => {
156-
logger.warn('could not purge event from cache');
157-
});
158-
}
154+
this._purgeEvent(cacheKey).catch((_error): void => {
155+
logger.warn('could not purge event from cache');
156+
});
159157
} else {
160158
logger.warn('no hub found - could not send cached event');
161159
}

0 commit comments

Comments
 (0)