Skip to content

Commit

Permalink
chore: remove duplicate config named eventWhiteList
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsSudip committed Mar 19, 2024
1 parent 14797b5 commit 28c9864
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 28c9864

Please sign in to comment.