Skip to content

Commit

Permalink
chore: remove duplicate config named eventWhiteList (#1652)
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsSudip authored Apr 26, 2024
1 parent 607c381 commit e85208b
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class TVSquared {
this.analytics = analytics;
this.brandId = config.brandId;
this.clientId = config.clientId;
this.eventWhiteList = config.eventWhiteList || [];
this.customMetrics = config.customMetrics || [];
this.name = NAME;
({
Expand Down Expand Up @@ -61,16 +60,6 @@ class TVSquared {
const { message } = rudderElement;
const { event, userId, anonymousId } = message;

const whitelistEvents = this.eventWhiteList.filter(wl => wl.event !== '');

const isEventInWhiteList = whitelistEvents.some(
whitelistEvent => whitelistEvent.event.toUpperCase() === event.toUpperCase(),
);

if (!isEventInWhiteList && whitelistEvents.length > 0) {
return;
}

const session = { user: userId || anonymousId || '' };
const action = getAction(message, this.customMetrics);

Expand Down

0 comments on commit e85208b

Please sign in to comment.