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 umakajan committed May 6, 2021
1 parent 5958b54 commit cd9bbfc
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 cd9bbfc

Please sign in to comment.