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

fix how native sizes are passed in AppNexus adapter #3832

Merged
merged 1 commit into from
May 22, 2019

Conversation

jsnellbaker
Copy link
Collaborator

Type of change

  • Bugfix

Description of change

This PR fixes a bug with how native sizes were passed into the UT request for the appNexusBidAdapter.

Previously the sizes for native.image and native.icon were passed as is into the request (ie sizes: [150, 100] was left in this state).

The UT needs these sizes converted to an object notation like the following:
sizes: [{width: 150, height: 100}]

With the changes, if we detect that someone passes the array of sizes (or an array of multiple array sizes), we'll convert the value to the proper format.

Additionally, I removed the minimumParams logic for the sizes as this was deemed unnecessary per further internal conversation. If there are no sizes supplied for a native asset, we do not need to pass an empty object array in the UT request; we can just not include the field and it would work.

Copy link
Member

@mkendall07 mkendall07 left a comment

Choose a reason for hiding this comment

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

LGTM

@jsnellbaker jsnellbaker merged commit c6c20a2 into master May 22, 2019
VideoReach pushed a commit to VideoReach/Prebid.js that referenced this pull request Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants