diff --git a/src/prebid.js b/src/prebid.js index 3d25eff6761..f22e734515b 100644 --- a/src/prebid.js +++ b/src/prebid.js @@ -282,14 +282,14 @@ $$PREBID_GLOBAL$$.renderAd = function (doc, id) { if (bid) { // replace macros according to openRTB with price paid = bid.cpm bid.ad = utils.replaceAuctionPrice(bid.ad, bid.cpm); - bid.url = utils.replaceAuctionPrice(bid.url, bid.cpm); + bid.adUrl = utils.replaceAuctionPrice(bid.adUrl, bid.cpm); // save winning bids $$PREBID_GLOBAL$$._winningBids.push(bid); // emit 'bid won' event here events.emit(BID_WON, bid); - const { height, width, ad, mediaType, adUrl: url, renderer } = bid; + const { height, width, ad, mediaType, adUrl, renderer } = bid; if (renderer && renderer.url) { renderer.render(bid); @@ -299,13 +299,13 @@ $$PREBID_GLOBAL$$.renderAd = function (doc, id) { doc.write(ad); doc.close(); setRenderSize(doc, width, height); - } else if (url) { + } else if (adUrl) { const iframe = utils.createInvisibleIframe(); iframe.height = height; iframe.width = width; iframe.style.display = 'inline'; iframe.style.overflow = 'hidden'; - iframe.src = url; + iframe.src = adUrl; utils.insertElement(iframe, doc, 'body'); setRenderSize(doc, width, height);