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

Add a check against the size config when setting targeting #3183

Merged
merged 1 commit into from
Oct 17, 2018

Conversation

snapwich
Copy link
Collaborator

Type of change

  • Bugfix

Description of change

Add an extra check for size configs when setting targeting so that a cached bid that was valid cannot be used if it has become invalid by the screen changing size since last auction.

Other information

fixes #2861

@@ -198,6 +199,7 @@ export function newTargeting(auctionManager) {

function getBidsReceived() {
const bidsReceived = auctionManager.getBidsReceived()
.filter(bid => bid.mediaType !== 'banner' || sizeSupported([bid.width, bid.height]))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for this bid.mediaType !== 'banner' here ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

size mapping only applies to (and filters) banner ads currently, so if it is not a banner bid then the filter will immediately let it through and not apply any size filtering.

@jsnellbaker jsnellbaker added the needs 2nd review Core module updates require two approvals from the core team label Oct 17, 2018
@snapwich snapwich merged commit 175a7ca into master Oct 17, 2018
@snapwich snapwich deleted the size-check-in-targeting branch October 17, 2018 21:42
idettman pushed a commit to rubicon-project/Prebid.js that referenced this pull request Nov 14, 2018
ghost pushed a commit to devunrulymedia/Prebid.js that referenced this pull request Jan 30, 2019
pedrolopezmrf pushed a commit to Marfeel/Prebid.js that referenced this pull request Mar 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs 2nd review Core module updates require two approvals from the core team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sizeConfig not honoured after window resize due to unexpired bids from previous auctions being used
3 participants