We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 75591d7 + 3ee0c39 commit 75cef47Copy full SHA for 75cef47
src/view/frontend/templates/cookie-banner-script.phtml
@@ -67,6 +67,11 @@ if (!$cookieHelper->isCookieRestrictionModeEnabled()) {
67
initialize() {
68
const cookies = JSON.parse(localStorage.getItem('consent-mode'));
69
70
+ //On a first domain visit consent-mode is not yet set so return to avoid a console error
71
+ if(!cookies) {
72
+ return;
73
+ }
74
+
75
this.consentConfig = {
76
necessary: cookies['functionality_storage'] === 'granted',
77
marketing: cookies['ad_storage'] === 'granted',
0 commit comments