Skip to content

Commit

Permalink
fix: Normalized Event before caching. (#3305)
Browse files Browse the repository at this point in the history
  • Loading branch information
mac89 committed Mar 11, 2021
1 parent 02a8c59 commit f824c80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/integrations/src/offline.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { Event, EventProcessor, Hub, Integration } from '@sentry/types';
import { getGlobalObject, logger, uuid4 } from '@sentry/utils';
import { getGlobalObject, logger, normalize, uuid4 } from '@sentry/utils';
import * as localForageType from 'localforage';

// eslint-disable-next-line @typescript-eslint/no-var-requires
Expand Down Expand Up @@ -98,7 +98,7 @@ export class Offline implements Integration {
* @param event an event
*/
private async _cacheEvent(event: Event): Promise<Event> {
return this.offlineEventStore.setItem<Event>(uuid4(), event);
return this.offlineEventStore.setItem<Event>(uuid4(), normalize(event));
}

/**
Expand Down

0 comments on commit f824c80

Please sign in to comment.