diff --git a/src/pretix/static/pretixpresale/js/ui/cookieconsent.js b/src/pretix/static/pretixpresale/js/ui/cookieconsent.js index 2e07c3074..873d4b8bc 100644 --- a/src/pretix/static/pretixpresale/js/ui/cookieconsent.js +++ b/src/pretix/static/pretixpresale/js/ui/cookieconsent.js @@ -5,7 +5,7 @@ $(function () { var storage_key = $("#cookie-consent-storage-key").text(); function update_consent(consent) { - if (storage_key) window.localStorage[storage_key] = JSON.stringify(consent); + if (storage_key && window.localStorage) window.localStorage[storage_key] = JSON.stringify(consent); window.pretix.cookie_consent = consent; // Event() is not supported by IE11, see ployfill here: