Skip to content

Commit

Permalink
Audience Network: Fix bid request validation for fullwidth (prebid#2417)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlackty authored and snapwich committed Apr 26, 2018
1 parent bb9bc18 commit 96878ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/audienceNetworkBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));

/**
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/audienceNetworkBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('AudienceNetwork adapter', () => {
it('fullwidth', () => {
expect(isBidRequestValid({
bidder,
sizes: [[300, 250]],
sizes: [[300, 250], [336, 280]],
params: {
placementId,
format: 'fullwidth'
Expand Down

0 comments on commit 96878ef

Please sign in to comment.