From e8d191fc90f29e8d8165d5bb469e8a85847a93ef Mon Sep 17 00:00:00 2001 From: shrouti1507 Date: Mon, 8 Apr 2024 16:36:24 +0530 Subject: [PATCH] fix: address review comments --- src/v0/destinations/awin/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/v0/destinations/awin/utils.js b/src/v0/destinations/awin/utils.js index b9497cdd5d..be5f22474d 100644 --- a/src/v0/destinations/awin/utils.js +++ b/src/v0/destinations/awin/utils.js @@ -44,7 +44,11 @@ const buildProductPayloadString = (payload) => { // ref: https://wiki.awin.com/index.php/Advertiser_Tracking_Guide/Product_Level_Tracking#PLT_Via_Conversion_Pixel const trackProduct = (properties, advertiserId, commissionParts) => { const transformedProductInfoObj = {}; - if (properties?.products && properties.products.length > 0) { + if ( + properties?.products && + Array.isArray(properties?.products) && + properties.products.length > 0 + ) { const productsArray = properties.products; let productIndex = 0; productsArray.forEach((product) => {