Skip to content

Commit

Permalink
Prebid Core: Restore use of server-side adapter without client-side a…
Browse files Browse the repository at this point in the history
…dapter (#7662)

* requestBids bug fix for s2sBidders and getConfig

* merged duplicate variables in requestBids
  • Loading branch information
jorgeluisrocha authored Nov 15, 2021
1 parent a8cdf2b commit b927d8d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/prebid.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,13 +554,12 @@ $$PREBID_GLOBAL$$.requestBids = hook('async', function ({ bidsBackHandler, timeo

logInfo('Invoking $$PREBID_GLOBAL$$.requestBids', arguments);

let _s2sConfigs = [];
const s2sBidders = [];
config.getConfig('s2sConfig', config => {
if (config && config.s2sConfig) {
_s2sConfigs = Array.isArray(config.s2sConfig) ? config.s2sConfig : [config.s2sConfig];
}
});
let _s2sConfigs = config.getConfig('s2sConfig') || [];

if (!Array.isArray(_s2sConfigs)) {
_s2sConfigs = [_s2sConfigs];
}

_s2sConfigs.forEach(s2sConfig => {
s2sBidders.push(...s2sConfig.bidders);
Expand Down

0 comments on commit b927d8d

Please sign in to comment.