From 202c4803be9b5d47332c2340ea29bf77ff954625 Mon Sep 17 00:00:00 2001 From: Piotr Konieczny Date: Thu, 10 Sep 2020 11:12:42 +0200 Subject: [PATCH] Remove false positive --- packages/integrations/src/offline.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/integrations/src/offline.ts b/packages/integrations/src/offline.ts index f4f60b7546cf..98f226b48e5b 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'); }