From f870a084213857f27b280ce9cda82df7f387751e Mon Sep 17 00:00:00 2001 From: mmoschovas <63253416+mmoschovas@users.noreply.github.com> Date: Thu, 22 Apr 2021 07:25:30 -0400 Subject: [PATCH] RP Bid Adapter: Bug fix for parsing ortb2.user.data (#6643) * Bug fix when parsing FPD data. Check for taxonomyname existence prior to match * Lint check --- modules/rubiconBidAdapter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/rubiconBidAdapter.js b/modules/rubiconBidAdapter.js index be71028f3ad..86e6525af85 100644 --- a/modules/rubiconBidAdapter.js +++ b/modules/rubiconBidAdapter.js @@ -904,7 +904,8 @@ function applyFPD(bidRequest, mediaType, data) { const MAP = {user: 'tg_v.', site: 'tg_i.', adserver: 'tg_i.dfp_ad_unit_code', pbadslot: 'tg_i.pbadslot', keywords: 'kw'}; const validate = function(prop, key) { if (key === 'data' && Array.isArray(prop)) { - return prop.filter(name => name.segment && utils.deepAccess(name, 'ext.taxonomyname').match(/iab/i)).map(value => { + return prop.filter(name => name.segment && utils.deepAccess(name, 'ext.taxonomyname') && + utils.deepAccess(name, 'ext.taxonomyname').match(/iab/i)).map(value => { let segments = value.segment.filter(obj => obj.id).reduce((result, obj) => { result.push(obj.id); return result;