Skip to content

Commit

Permalink
use array map/join instead of object.entries
Browse files Browse the repository at this point in the history
  • Loading branch information
aprakash-sovrn committed Dec 10, 2019
1 parent 5e3a58e commit 4391cc6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/sovrnBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,19 @@ export const spec = {
if (syncOptions.iframeEnabled) {
const iidArr = serverResponses.filter(resp => utils.deepAccess(resp, 'body.ext.iid'))
.map(resp => resp.body.ext.iid);
const params = {};
const params = [];
if (gdprConsent && gdprConsent.gdprApplies && typeof gdprConsent.consentString === 'string') {
params['gdpr_consent'] = gdprConsent.consentString
params.push(['gdpr_consent', gdprConsent.consentString]);
}
if (uspConsent) {
params['us_privacy'] = uspConsent;
params.push(['us_privacy', uspConsent]);
}

if (iidArr[0]) {
params.informer = iidArr[0];
params.push(['informer', iidArr[0]]);
tracks.push({
type: 'iframe',
url: 'https://ap.lijit.com/beacon?' + Object.entries(params).map(p => p.join('=')).join('&')
url: 'https://ap.lijit.com/beacon?' + params.map(p => p.join('=')).join('&')
});
}
}
Expand Down

0 comments on commit 4391cc6

Please sign in to comment.