Skip to content

Commit

Permalink
Sending empty array instead of string. (#9846)
Browse files Browse the repository at this point in the history
  • Loading branch information
desidiver authored Apr 24, 2023
1 parent dc7b3c6 commit ecbb223
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/yieldmoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const spec = {
gdprApplies: deepAccess(bidderRequest, 'gdprConsent.gdprApplies') || '',
cmp: deepAccess(bidderRequest, 'gdprConsent.consentString') || '',
gpp: deepAccess(bidderRequest, 'gppConsent.gppString') || '',
gpp_sid: deepAccess(bidderRequest, 'gppConsent.applicableSections') || ''
gpp_sid: deepAccess(bidderRequest, 'gppConsent.applicableSections') || []
}),
us_privacy: deepAccess(bidderRequest, 'uspConsent') || ''
};
Expand Down Expand Up @@ -525,7 +525,7 @@ function populateOpenRtbGdpr(openRtbRequest, bidderRequest) {
deepSetValue(openRtbRequest, 'regs.ext.gdpr', gdpr && gdpr.gdprApplies ? 1 : 0);
deepSetValue(openRtbRequest, 'user.ext.consent', gdpr && gdpr.consentString ? gdpr.consentString : '');
}
if (gppsid) {
if (gppsid && gppsid.length > 0) {
deepSetValue(openRtbRequest, 'regs.ext.gpp_sid', gppsid);
}
const uspConsent = deepAccess(bidderRequest, 'uspConsent');
Expand Down
4 changes: 2 additions & 2 deletions test/spec/modules/yieldmoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ describe('YieldmoAdapter', function () {
expect(data.hasOwnProperty('h')).to.be.true;
expect(data.hasOwnProperty('w')).to.be.true;
expect(data.hasOwnProperty('pubcid')).to.be.true;
expect(data.userConsent).to.equal('{"gdprApplies":"","cmp":"","gpp":"","gpp_sid":""}');
expect(data.userConsent).to.equal('{"gdprApplies":"","cmp":"","gpp":"","gpp_sid":[]}');
expect(data.us_privacy).to.equal('');
});

Expand Down Expand Up @@ -263,7 +263,7 @@ describe('YieldmoAdapter', function () {
gdprApplies: true,
cmp: 'BOJ/P2HOJ/P2HABABMAAAAAZ+A==',
gpp: '',
gpp_sid: '',
gpp_sid: [],
})
);
});
Expand Down

0 comments on commit ecbb223

Please sign in to comment.