diff --git a/packages/integrations/src/offline.ts b/packages/integrations/src/offline.ts index 85b561b950e1..2168815a2f16 100644 --- a/packages/integrations/src/offline.ts +++ b/packages/integrations/src/offline.ts @@ -149,13 +149,11 @@ export class Offline implements Integration { private async _sendEvents(): Promise { return this.offlineEventStore.iterate((event: Event, cacheKey: string, _index: number): void => { if (this.hub) { - const newEventId = this.hub.captureEvent(event); + this.hub.captureEvent(event); - if (newEventId) { - this._purgeEvent(cacheKey).catch((_error): void => { - logger.warn('could not purge event from cache'); - }); - } + this._purgeEvent(cacheKey).catch((_error): void => { + logger.warn('could not purge event from cache'); + }); } else { logger.warn('no hub found - could not send cached event'); }