Skip to content

Commit

Permalink
update string validation to use isStr
Browse files Browse the repository at this point in the history
  • Loading branch information
idettman committed May 29, 2020
1 parent b2ecb74 commit d7fdd68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/prebidServerBidAdapter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ const OPEN_RTB_PROTOCOL = {
* @type {(string|undefined)}
*/
const pbAdSlot = utils.deepAccess(adUnit, 'fpd.context.pbAdSlot');
if (!utils.isEmptyStr(pbAdSlot)) {
if (typeof pbAdSlot === 'string' && pbAdSlot) {
utils.deepSetValue(imp, 'ext.context.data.adslot', pbAdSlot);
}

Expand Down Expand Up @@ -725,7 +725,7 @@ const OPEN_RTB_PROTOCOL = {
// once we get through the transition, this block will be removed.
if (utils.isPlainObject(extPrebidTargeting)) {
// If wurl exists, remove hb_winurl and hb_bidid targeting attributes
if (!utils.isEmptyStr(utils.deepAccess(bid, 'ext.prebid.event.win'))) {
if (utils.isStr(utils.deepAccess(bid, 'ext.prebid.event.win'))) {
extPrebidTargeting = utils.getDefinedParams(extPrebidTargeting, Object.keys(extPrebidTargeting)
.filter(i => (i.indexOf('hb_winurl') === -1 && i.indexOf('hb_bidid') === -1)));
}
Expand Down

0 comments on commit d7fdd68

Please sign in to comment.