Skip to content

Commit

Permalink
fix: address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
shrouti1507 committed Apr 8, 2024
1 parent 26b91c6 commit e8d191f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/v0/destinations/awin/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit e8d191f

Please sign in to comment.