Skip to content

Commit

Permalink
Bugfix: Check availability of "consentDates"
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikdro committed Feb 17, 2021
1 parent 07439b7 commit 19ad6dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/Public/JavaScript/Initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if (document.cookie.indexOf(KD_GDPR_CC.cookieName) >= 0) {
);

var versionDate = new Date(KD_GDPR_CC.versionTimestamp);
var cookieConsentDate = cookieObject.consentDates[KD_GDPR_CC.dimensionsIdentifier]
var cookieConsentDate = cookieObject.consentDates && cookieObject.consentDates[KD_GDPR_CC.dimensionsIdentifier]
? new Date(cookieObject.consentDates[KD_GDPR_CC.dimensionsIdentifier])
: new Date(cookieObject.consentDate);

Expand Down

0 comments on commit 19ad6dd

Please sign in to comment.