Skip to content

Commit

Permalink
add null checks (#2814)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur-modi authored and mike-chowla committed Jul 6, 2018
1 parent 5b0a5b7 commit 772aa6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/oneVideoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ function getSize(sizes) {
function getRequestData(bid) {
let loc = utils.getTopWindowLocation();
let global = (window.top) ? window.top : window;
let page = (bid.params.site.page) ? (bid.params.site.page) : (loc.href);
let ref = (bid.params.site.referrer) ? bid.params.site.referrer : utils.getTopWindowReferrer();
let page = (bid.params.site && bid.params.site.page) ? (bid.params.site.page) : (loc.href);
let ref = (bid.params.site && bid.params.site.referrer) ? bid.params.site.referrer : utils.getTopWindowReferrer();
let bidData = {
id: utils.generateUUID(),
at: 2,
Expand Down Expand Up @@ -176,7 +176,7 @@ function getRequestData(bid) {
if (bid.params.video.position) {
bidData.imp[0].video.pos = bid.params.video.position
}
if (bid.params.site.id) {
if (bid.params.site && bid.params.site.id) {
bidData.site.id = bid.params.site.id
}
return bidData;
Expand Down

0 comments on commit 772aa6f

Please sign in to comment.