Skip to content

Commit

Permalink
refactor: remove redundant import
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauravudia committed Feb 13, 2024
1 parent 4aa63f6 commit f3b4d53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/v0/destinations/tiktok_ads/transformV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const {
} = require('../../util');
const { getContents, hashUserField } = require('./util');
const config = require('./config');
const { CommonUtils } = require('../../../util/common');

const { trackMappingV2, trackEndpointV2, eventNameMapping, PARTNER_NAME } = config;
const { JSON_MIME_TYPE } = require('../../util/constant');
Expand All @@ -37,7 +36,7 @@ const getTrackResponsePayload = (message, destConfig, event) => {

// if contents is not an array converting it into array
if (payload.properties?.contents && !Array.isArray(payload.properties.contents)) {
payload.properties.contents = CommonUtils.toArray(payload.properties.contents);
payload.properties.contents = [payload.properties.contents];
}

// if contents is not present but we have properties.products present which has fields with superset of contents fields
Expand Down

0 comments on commit f3b4d53

Please sign in to comment.