Skip to content

Commit

Permalink
Merge pull request #723 from prebid/feature/banner_ad_unit_size_problem
Browse files Browse the repository at this point in the history
BannerAdUnit size problem
  • Loading branch information
jsligh authored Dec 12, 2023
2 parents 85a5dda + 5e86702 commit 77abd96
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,9 @@ private void setBannerImpValues(Imp imp) {
}

BannerParameters bannerParameters = adConfiguration.getBannerParameters();
if (bannerParameters != null) {
Set<AdSize> adSizes = bannerParameters.getAdSizes();
if (adSizes != null) {
for (AdSize size : adSizes) {
banner.addFormat(size.getWidth(), size.getHeight());
}
if (bannerParameters != null && bannerParameters.getAdSizes() != null && !bannerParameters.getAdSizes().isEmpty()) {
for (AdSize size : bannerParameters.getAdSizes()) {
banner.addFormat(size.getWidth(), size.getHeight());
}
} else if (adConfiguration.isAdType(AdFormat.BANNER)) {
for (AdSize size : adConfiguration.getSizes()) {
Expand Down

0 comments on commit 77abd96

Please sign in to comment.