Skip to content

Commit

Permalink
OneTrust_CookieConesnt_Changes: minor big fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchiramoitra committed Dec 24, 2021
1 parent 968e642 commit 171fc79
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cookieConsent/OneTrust/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ class OneTrust {
oneTrustAllGroupsInfo.forEach((group) => {
const { CustomGroupId, GroupName } = group;
if (userSetConsentGroupIds.includes(CustomGroupId)) {
this.userSetConsentGroupNames.push(GroupName.toUpperCase().trim());
this.userSetConsentGroupNames.push(
GroupName.toUpperCase().replace(/\s+/g, "")
);
}
});
}
Expand Down Expand Up @@ -84,7 +86,9 @@ class OneTrust {
) {
// Check if all the destination's mapped cookie categories are consented by the user in the browser.
containsAllConsent = oneTrustConsentGroupArr.every((element) =>
this.userSetConsentGroupNames.includes(element.toUpperCase().trim())
this.userSetConsentGroupNames.includes(
element.toUpperCase().replace(/\s+/g, "")
)
);
}
return containsAllConsent;
Expand Down

0 comments on commit 171fc79

Please sign in to comment.