Skip to content

Commit

Permalink
Appnexus Bid Adapter: support native feature flags (prebid#8597)
Browse files Browse the repository at this point in the history
* appnexus bid adapter - support native feature flags

* add feature flag to native tests
  • Loading branch information
jsnellbaker authored and bwhisp committed Jul 13, 2022
1 parent da6da90 commit ed5589b
Show file tree
Hide file tree
Showing 2 changed files with 168 additions and 159 deletions.
6 changes: 3 additions & 3 deletions modules/appnexusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ export const spec = {
* @param {Bid} bid
*/
onBidWon: function (bid) {
if (bid.native) {
if (FEATURES.NATIVE && bid.native) {
reloadViewabilityScriptWithCorrectParameters(bid);
}
}
Expand Down Expand Up @@ -715,7 +715,7 @@ function newBid(serverBid, rtbBid, bidderRequest) {
bid.vastUrl = rtbBid.notify_url + '&redir=' + encodeURIComponent(rtbBid.rtb.video.asset_url);
break;
}
} else if (rtbBid.rtb[NATIVE]) {
} else if (FEATURES.NATIVE && rtbBid.rtb[NATIVE]) {
const nativeAd = rtbBid.rtb[NATIVE];

// setting up the jsTracker:
Expand Down Expand Up @@ -853,7 +853,7 @@ function bidToTag(bid) {
tag.gpid = gpid;
}

if (bid.mediaType === NATIVE || deepAccess(bid, `mediaTypes.${NATIVE}`)) {
if (FEATURES.NATIVE && (bid.mediaType === NATIVE || deepAccess(bid, `mediaTypes.${NATIVE}`))) {
tag.ad_types.push(NATIVE);
if (tag.sizes.length === 0) {
tag.sizes = transformSizes([1, 1]);
Expand Down
Loading

0 comments on commit ed5589b

Please sign in to comment.