Skip to content

Commit

Permalink
checks for existence
Browse files Browse the repository at this point in the history
  • Loading branch information
karimMourra committed Sep 9, 2022
1 parent 2ec3e65 commit 06b4f83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions modules/spotxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,27 +177,27 @@ export const spec = {
}

const startdelay = getBidIdParameter('start_delay', bid.params) || deepAccess(bid, 'mediaTypes.video.startdelay');
if (startdelay != '') {
if (startdelay) {
spotxReq.video.startdelay = 0 + Boolean(startdelay);
}

const minduration = getBidIdParameter('min_duration', bid.params) || deepAccess(bid, 'mediaTypes.video.minduration');
if (minduration != '') {
if (minduration) {
spotxReq.video.minduration = minduration;
}

const maxduration = getBidIdParameter('max_duration', bid.params) || deepAccess(bid, 'mediaTypes.video.maxduration');
if (maxduration != '') {
if (maxduration) {
spotxReq.video.maxduration = maxduration;
}

const placement = getBidIdParameter('placement_type', bid.params) || deepAccess(bid, 'mediaTypes.video.placement');
if (placement != '') {
if (placement) {
spotxReq.video.ext.placement = placement;
}

const position = getBidIdParameter('position', bid.params) || deepAccess(bid, 'mediaTypes.video.pos');
if (position != '') {
if (position) {
spotxReq.video.ext.pos = position;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function getUtilsMock() {
getPlaybackMethod: function () {},
isOmidSupported: function () {},
getSkipParams: function () {},
getJwEvent: function () {},
getJwEvent: event => event,
getIsoLanguageCode: function () {},
getSegments: function () {},
getContentDatum: function () {}
Expand Down

0 comments on commit 06b4f83

Please sign in to comment.