Skip to content

Commit

Permalink
PubMatic : Check for 'bid.ext.bidtype' key instead of 'bid.ext.Bidtyp…
Browse files Browse the repository at this point in the history
…e' key in translator response object. (prebid#7683)

* Replaced bid.ext.BidType with bid.ext.bidType

* Replaced bidType with bidtype

Co-authored-by: Kapil Tuptewar <kapiltuptewar@L1290.local>
  • Loading branch information
2 people authored and Chris Pabst committed Jan 10, 2022
1 parent 42e0285 commit fa9d4c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions modules/pubmaticBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -867,10 +867,10 @@ function _handleEids(payload, validBidRequests) {

function _checkMediaType(bid, newBid) {
// Create a regex here to check the strings
if (bid.ext && bid.ext['BidType'] != undefined) {
newBid.mediaType = MEDIATYPE[bid.ext.BidType];
if (bid.ext && bid.ext['bidtype'] != undefined) {
newBid.mediaType = MEDIATYPE[bid.ext.bidtype];
} else {
logInfo(LOG_WARN_PREFIX + 'bid.ext.BidType does not exist, checking alternatively for mediaType')
logInfo(LOG_WARN_PREFIX + 'bid.ext.bidtype does not exist, checking alternatively for mediaType')
var adm = bid.adm;
var admStr = '';
var videoRegex = new RegExp(/VAST\s+version/);
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/pubmaticBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3457,7 +3457,7 @@ describe('PubMatic adapter', function () {
'h': 0,
'dealId': 'ASEA-MS-KLY-TTD-DESKTOP-ID-VID-6S-030420',
'ext': {
'BidType': 1
'bidtype': 1
}
}],
'ext': {
Expand Down

0 comments on commit fa9d4c7

Please sign in to comment.