Skip to content

Commit

Permalink
Fix processCallbacks to accept an optional list of arguments (prebid#717
Browse files Browse the repository at this point in the history
)
  • Loading branch information
csirmaz authored and matthewlane committed Oct 19, 2016
1 parent d6adf1e commit 943f38c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bidmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,12 @@ function triggerAdUnitCallbacks(adUnitCode) {
processCallbacks(externalCallbackByAdUnitArr, params);
}

function processCallbacks(callbackQueue) {
function processCallbacks(callbackQueue, params) {
var i;
if (utils.isArray(callbackQueue)) {
for (i = 0; i < callbackQueue.length; i++) {
var func = callbackQueue[i];
func.call($$PREBID_GLOBAL$$, $$PREBID_GLOBAL$$._bidsReceived.reduce(groupByPlacement, {}));
func.apply($$PREBID_GLOBAL$$, params || [$$PREBID_GLOBAL$$._bidsReceived.reduce(groupByPlacement, {})]);
}
}
}
Expand Down

0 comments on commit 943f38c

Please sign in to comment.