Skip to content

Commit

Permalink
checks for ad unit
Browse files Browse the repository at this point in the history
  • Loading branch information
karimMourra committed Oct 3, 2023
1 parent 2afe71a commit 8002967
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/prebid.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,9 @@ pbjsInstance.renderAd = hook('async', function (doc, id, options) {
if (FEATURES.VIDEO) {
const adUnit = auctionManager.index.getAdUnit(bid);
const videoModule = pbjsInstance.videoModule;
if (adUnit.video && videoModule) {
videoModule.renderBid(adUnit.video.divId, bid);
const divId = adUnit && adUnit.video && adUnit.video.divId;
if (videoModule && divId) {
videoModule.renderBid(divId, bid);
return;
}
}
Expand Down

0 comments on commit 8002967

Please sign in to comment.