From f3b4d534f96917f31a044e95617babd506accbba Mon Sep 17 00:00:00 2001 From: Gauravudia Date: Tue, 13 Feb 2024 09:11:11 +0530 Subject: [PATCH] refactor: remove redundant import --- src/v0/destinations/tiktok_ads/transformV2.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/v0/destinations/tiktok_ads/transformV2.js b/src/v0/destinations/tiktok_ads/transformV2.js index 396d18592c..98f7d61e1e 100644 --- a/src/v0/destinations/tiktok_ads/transformV2.js +++ b/src/v0/destinations/tiktok_ads/transformV2.js @@ -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'); @@ -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