Skip to content

Commit

Permalink
RP Bid Adapter: Bug fix for parsing ortb2.user.data (prebid#6643)
Browse files Browse the repository at this point in the history
* Bug fix when parsing FPD data. Check for taxonomyname existence prior to match

* Lint check
  • Loading branch information
mmoschovas authored and stsepelin committed May 28, 2021
1 parent 80019d5 commit 4426d34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/rubiconBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4426d34

Please sign in to comment.