From d3ec9c5a33bfb9b052a1ff9ece59dd69c18610ff Mon Sep 17 00:00:00 2001 From: Filip Stamenkovic Date: Mon, 15 Nov 2021 11:39:08 +0100 Subject: [PATCH] Revert "Prebid Core: Restore use of server-side adapter without client-side adapter (#7662)" This reverts commit b927d8d21628c42cbbfc6bfac8823528f53a25da. --- src/prebid.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/prebid.js b/src/prebid.js index 5dec6b86336..855d53d7de0 100644 --- a/src/prebid.js +++ b/src/prebid.js @@ -554,12 +554,13 @@ $$PREBID_GLOBAL$$.requestBids = hook('async', function ({ bidsBackHandler, timeo logInfo('Invoking $$PREBID_GLOBAL$$.requestBids', arguments); + let _s2sConfigs = []; const s2sBidders = []; - let _s2sConfigs = config.getConfig('s2sConfig') || []; - - if (!Array.isArray(_s2sConfigs)) { - _s2sConfigs = [_s2sConfigs]; - } + config.getConfig('s2sConfig', config => { + if (config && config.s2sConfig) { + _s2sConfigs = Array.isArray(config.s2sConfig) ? config.s2sConfig : [config.s2sConfig]; + } + }); _s2sConfigs.forEach(s2sConfig => { s2sBidders.push(...s2sConfig.bidders);