From 47ad20f4bf9418bd4842fe5916cc11bdbd116b63 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Tue, 21 Mar 2023 10:28:22 -0400 Subject: [PATCH] Criteo Bid Adapter: reinforce adomain type in case of missmatch (#9687) * Update criteoBidAdapter.js * Update auction.js --- modules/criteoBidAdapter.js | 2 +- src/auction.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/criteoBidAdapter.js b/modules/criteoBidAdapter.js index 7f2d6f2a3fb..e6564ca19d6 100644 --- a/modules/criteoBidAdapter.js +++ b/modules/criteoBidAdapter.js @@ -233,7 +233,7 @@ export const spec = { bid.meta = Object.assign({}, bid.meta, { paf: pafResponseMeta }); } if (slot.adomain) { - bid.meta = Object.assign({}, bid.meta, { advertiserDomains: slot.adomain }); + bid.meta = Object.assign({}, bid.meta, { advertiserDomains: [slot.adomain].flat() }); } if (slot.native) { if (bidRequest.params.nativeCallback) { diff --git a/src/auction.js b/src/auction.js index 6dd0432712f..a1e0fe13573 100644 --- a/src/auction.js +++ b/src/auction.js @@ -835,7 +835,7 @@ export const getPriceByGranularity = (granularity) => { */ export const getAdvertiserDomain = () => { return (bid) => { - return (bid.meta && bid.meta.advertiserDomains && bid.meta.advertiserDomains.length > 0) ? bid.meta.advertiserDomains[0] : ''; + return (bid.meta && bid.meta.advertiserDomains && bid.meta.advertiserDomains.length > 0) ? [bid.meta.advertiserDomains].flat()[0] : ''; } }