diff --git a/Resources/Public/JavaScript/Initialize.js b/Resources/Public/JavaScript/Initialize.js index 5eac0be..8b0ef6b 100644 --- a/Resources/Public/JavaScript/Initialize.js +++ b/Resources/Public/JavaScript/Initialize.js @@ -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);