diff --git a/modules/kubientBidAdapter.js b/modules/kubientBidAdapter.js index 380b4368558..fd776793d91 100644 --- a/modules/kubientBidAdapter.js +++ b/modules/kubientBidAdapter.js @@ -121,10 +121,11 @@ export const spec = { } let values = {}; - - if (typeof gdprConsent.gdprApplies === 'boolean') { - values['gdpr'] = Number(gdprConsent.gdprApplies); - if (gdprConsent && typeof gdprConsent.consentString === 'string') { + if (gdprConsent) { + if (typeof gdprConsent.gdprApplies === 'boolean') { + values['gdpr'] = Number(gdprConsent.gdprApplies); + } + if (typeof gdprConsent.consentString === 'string') { values['consent'] = gdprConsent.consentString; } } diff --git a/test/spec/modules/kubientBidAdapter_spec.js b/test/spec/modules/kubientBidAdapter_spec.js index 8e4264b4fd7..2d3801450ba 100644 --- a/test/spec/modules/kubientBidAdapter_spec.js +++ b/test/spec/modules/kubientBidAdapter_spec.js @@ -397,7 +397,7 @@ describe('KubientAdapter', function () { } }); let syncs = spec.getUserSyncs(syncOptions, serverResponses, gdprConsent, uspConsent); - // values['consent'] = consentString; + values['consent'] = consentString; expect(syncs).to.be.an('array').and.to.have.length(1); expect(syncs[0].type).to.equal('image'); expect(syncs[0].url).to.equal('https://matching.kubient.net/match/sp?' + encodeQueryData(values)); @@ -487,7 +487,7 @@ describe('KubientAdapter', function () { } }); let syncs = spec.getUserSyncs(syncOptions, serverResponses, gdprConsent, uspConsent); - // values['consent'] = consentString; + values['consent'] = consentString; values['usp'] = uspConsent; expect(syncs).to.be.an('array').and.to.have.length(1); expect(syncs[0].type).to.equal('image');