Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: support for expandable / flex slots #12379

Merged
merged 9 commits into from
Mar 7, 2025
Prev Previous commit
Next Next commit
do not set expdir: undefined
  • Loading branch information
dgirardi committed Oct 29, 2024
commit f213e8bc227b182091e0d1c0a65c34371713f9d6
6 changes: 4 additions & 2 deletions src/prebid.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,14 @@ function validateBannerMediaType(adUnit) {
}
const sizes = formatSizes ?? bannerSizes ?? [];
const expdir = adUnit.ortb2Imp?.banner?.expdir ?? banner.expdir;
if (expdir != null) {
banner.expdir = expdir;
deepSetValue(validatedAdUnit, 'ortb2Imp.banner.expdir', expdir);
}
if (sizes.length > 0) {
banner.sizes = sizes;
// Deprecation Warning: This property will be deprecated in next release in favor of adUnit.mediaTypes.banner.sizes
validatedAdUnit.sizes = sizes;
banner.expdir = expdir;
deepSetValue(validatedAdUnit, 'ortb2Imp.banner.expdir', expdir);
} else {
logError('Detected a mediaTypes.banner object without a proper sizes field. Please ensure the sizes are listed like: [[300, 250], ...]. Removing invalid mediaTypes.banner object from request.');
delete validatedAdUnit.mediaTypes.banner
Expand Down