Skip to content

Commit

Permalink
fix issue calling requestBids(); (prebid#1058)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Kendall authored and Mat Brown committed Mar 20, 2017
1 parent 9621ec7 commit 1b7ab5b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/prebid.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ $$PREBID_GLOBAL$$.setTargetingForGPTAsync = function () {

//first reset any old targeting
targeting.resetPresetTargeting();

//now set new targeting keys
targeting.setTargeting(targeting.getAllTargeting());
//emit event

//emit event
events.emit(SET_TARGETING);
};

Expand All @@ -261,8 +261,8 @@ $$PREBID_GLOBAL$$.setTargetingForAst = function() {
}

targeting.setTargetingForAst();
//emit event

//emit event
events.emit(SET_TARGETING);
};

Expand Down Expand Up @@ -300,7 +300,7 @@ $$PREBID_GLOBAL$$.renderAd = function (doc, id) {
var width = adObject.width;
var url = adObject.adUrl;
var ad = adObject.ad;

if (doc === document || adObject.mediaType === 'video') {
utils.logError(`Error trying to write ad. Ad render call ad id ${id} was prevented from writing to the main document.`);
} else if (ad) {
Expand Down Expand Up @@ -363,7 +363,7 @@ $$PREBID_GLOBAL$$.clearAuction = function() {
* @param adUnits
* @param adUnitCodes
*/
$$PREBID_GLOBAL$$.requestBids = function ({ bidsBackHandler, timeout, adUnits, adUnitCodes }) {
$$PREBID_GLOBAL$$.requestBids = function ({ bidsBackHandler, timeout, adUnits, adUnitCodes } = {}) {
events.emit('requestBids');
const cbTimeout = $$PREBID_GLOBAL$$.cbTimeout = timeout || $$PREBID_GLOBAL$$.bidderTimeout;
adUnits = adUnits || $$PREBID_GLOBAL$$.adUnits;
Expand Down

0 comments on commit 1b7ab5b

Please sign in to comment.