From 5243fb775386f90d607bc1370716bc7fd5823d1c Mon Sep 17 00:00:00 2001 From: Richard Lee <14349+dlackty@users.noreply.github.com> Date: Fri, 27 Apr 2018 00:17:19 +0800 Subject: [PATCH] Audience Network: Fix bid request validation for fullwidth (#2417) --- modules/audienceNetworkBidAdapter.js | 2 +- test/spec/modules/audienceNetworkBidAdapter_spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/audienceNetworkBidAdapter.js b/modules/audienceNetworkBidAdapter.js index 263edba878a2..612357e0e4ab 100644 --- a/modules/audienceNetworkBidAdapter.js +++ b/modules/audienceNetworkBidAdapter.js @@ -27,7 +27,7 @@ const isBidRequestValid = bid => typeof bid.params.placementId === 'string' && bid.params.placementId.length > 0 && Array.isArray(bid.sizes) && bid.sizes.length > 0 && - (isFullWidth(bid.params.format) ? bid.sizes.map(flattenSize).every(size => size === '300x250') : true) && + (isFullWidth(bid.params.format) ? bid.sizes.map(flattenSize).some(size => size === '300x250') : true) && (isValidNonSizedFormat(bid.params.format) || bid.sizes.map(flattenSize).some(isValidSize)); /** diff --git a/test/spec/modules/audienceNetworkBidAdapter_spec.js b/test/spec/modules/audienceNetworkBidAdapter_spec.js index 41a6d955c6a9..f9d46e100b1f 100644 --- a/test/spec/modules/audienceNetworkBidAdapter_spec.js +++ b/test/spec/modules/audienceNetworkBidAdapter_spec.js @@ -75,7 +75,7 @@ describe('AudienceNetwork adapter', () => { it('fullwidth', () => { expect(isBidRequestValid({ bidder, - sizes: [[300, 250]], + sizes: [[300, 250], [336, 280]], params: { placementId, format: 'fullwidth'