From 073c20e9752c719cc5227d676a14623582115645 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 22 May 2025 16:38:35 +0200 Subject: [PATCH] Fix JS error on shops without cookie consent --- src/pretix/static/pretixpresale/js/ui/cookieconsent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pretix/static/pretixpresale/js/ui/cookieconsent.js b/src/pretix/static/pretixpresale/js/ui/cookieconsent.js index e9de4354c..b16525673 100644 --- a/src/pretix/static/pretixpresale/js/ui/cookieconsent.js +++ b/src/pretix/static/pretixpresale/js/ui/cookieconsent.js @@ -28,7 +28,7 @@ $(function () { document.dispatchEvent(e) } - if (!storage_key) { + if (!storage_key || !consent_modal) { // We are not on a page where the consent should run, fire the change event with empty consent but don't // actually store anything. update_consent(null, false);