Skip to content

Commit

Permalink
Address PR Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alexs-mparticle committed Feb 20, 2024
1 parent 7697527 commit fb74ff0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/GoogleAdWordsEventForwarder.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,15 +404,15 @@
function generateConsentStatePayloadFromMappings(consentState, mappings, defaults) {
var payload = cloneObject(defaults);

for (var mappingEntry of mappings) {
for (var i = 0; i <= mappings.length - 1; i++) {
var mappingEntry = mappings[i];
if (
consentState[mappingEntry.map] &&
mappingEntry.maptype === 'ConsentPurposes' &&
googleConsentProperties.includes(mappingEntry.value)
) {
payload[mappingEntry.value] = consentState[
mappingEntry.map
].Consented
payload[mappingEntry.value] = consentState[mappingEntry.map]
.Consented
? googleConsentValues.Granted
: googleConsentValues.Denied;
}
Expand Down

0 comments on commit fb74ff0

Please sign in to comment.