Skip to content

Commit

Permalink
[EXCH-10877] create const, use null instead of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
gmiedlar-ox committed Jan 7, 2025
1 parent b33ba81 commit 6044ea0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/openxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function buildRequests(bids, bidderRequest) {
// In case of multi-format bids remove `video` from mediaTypes as for video a separate bid request is built
.map(bid => ({...bid, mediaTypes: {...bid.mediaTypes, video: undefined}}));

let requests = bannerAndNativeBids.length ? [createRequest(bannerAndNativeBids, bidderRequest, undefined)] : [];
let requests = bannerAndNativeBids.length ? [createRequest(bannerAndNativeBids, bidderRequest, null)] : [];
videoBids.forEach(bid => {
requests.push(createRequest([bid], bidderRequest, VIDEO));
});
Expand All @@ -191,7 +191,8 @@ function isNativeBid(bid) {
}

function isBannerBid(bid) {
return utils.deepAccess(bid, 'mediaTypes.banner') || (!isVideoBid(bid) && !isNativeBid(bid));
const isNotVideoOrNativeBid = !isVideoBid(bid) && !isNativeBid(bid)
return utils.deepAccess(bid, 'mediaTypes.banner') || isNotVideoOrNativeBid;
}

function interpretResponse(resp, req) {
Expand Down

0 comments on commit 6044ea0

Please sign in to comment.