Skip to content

Commit ef00b3f

Browse files
Fix v2CmpResponseCallback handle (#5564)
* Fix v2CmpResponseCallback handle * Add case when gdpr doesn't apply to v2CmpResponseCallback Co-authored-by: Aleksandar Kiselicki <[email protected]>
1 parent b9ebe16 commit ef00b3f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/consentManagement.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ function lookupIabConsent(cmpSuccess, cmpError, hookConfig) {
100100
function v2CmpResponseCallback(tcfData, success) {
101101
utils.logInfo('Received a response from CMP', tcfData);
102102
if (success) {
103-
if (tcfData.eventStatus === 'tcloaded' || tcfData.eventStatus === 'useractioncomplete') {
103+
if (tcfData.gdprApplies === false) {
104+
cmpSuccess(tcfData, hookConfig);
105+
} else if (tcfData.eventStatus === 'tcloaded' || tcfData.eventStatus === 'useractioncomplete') {
104106
cmpSuccess(tcfData, hookConfig);
105107
} else if (tcfData.eventStatus === 'cmpuishown' && tcfData.tcString && tcfData.purposeOneTreatment === true) {
106108
cmpSuccess(tcfData, hookConfig);

0 commit comments

Comments
 (0)