Skip to content

Commit

Permalink
Appnexus adapter: check purpose one (prebid#5057)
Browse files Browse the repository at this point in the history
Co-authored-by: Jaimin Panchal <[email protected]>
  • Loading branch information
2 people authored and iggyfisk committed Jun 22, 2020
1 parent 6d87f5a commit f7ceec5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/appnexusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ function hasPurpose1Consent(bidderRequest) {
let result = true;
if (bidderRequest && bidderRequest.gdprConsent) {
if (bidderRequest.gdprConsent.gdprApplies && bidderRequest.gdprConsent.apiVersion === 2) {
result = !!(utils.deepAccess(bidderRequest.gdprConsent, `vendorData.vendor.consents.${GVLID}`));
result = !!(utils.deepAccess(bidderRequest.gdprConsent, 'vendorData.purpose.consents.1') === true);
}
}
return result;
Expand Down
4 changes: 2 additions & 2 deletions test/spec/modules/appnexusBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -788,9 +788,9 @@ describe('AppNexusAdapter', function () {
gdprApplies: true,
apiVersion: 2,
vendorData: {
vendor: {
purpose: {
consents: {
32: false
1: false
}
}
}
Expand Down

0 comments on commit f7ceec5

Please sign in to comment.