Skip to content

Commit

Permalink
sizeMapping: do not require configuration (prebid#11920)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgirardi authored and DecayConstant committed Jul 18, 2024
1 parent febd9bc commit 466b9e3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions modules/sizeMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {includes} from '../src/polyfill.js';
import {BANNER, VIDEO} from '../src/mediaTypes.js';
import {setupAdUnitMediaTypes} from '../src/adapterManager.js';

let installed = false;
let sizeConfig = [];

/**
Expand All @@ -24,11 +23,9 @@ let sizeConfig = [];
*/
export function setSizeConfig(config) {
sizeConfig = config;
if (!installed) {
setupAdUnitMediaTypes.before((next, adUnit, labels) => next(processAdUnitsForLabels(adUnit, labels), labels));
installed = true;
}
}

setupAdUnitMediaTypes.before((next, adUnit, labels) => next(processAdUnitsForLabels(adUnit, labels), labels));
config.getConfig('sizeConfig', config => setSizeConfig(config.sizeConfig));

/**
Expand Down

0 comments on commit 466b9e3

Please sign in to comment.