Make sure the window.cookieconsent object is loaded before using it, as some browsers or extensions might block it

This commit is contained in:
Alex Tselegidis 2022-03-08 17:31:33 +01:00
parent c1a8dba1a3
commit 13e81c80b1
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ window.FrontendBook = window.FrontendBook || {};
defaultEventHandlers = defaultEventHandlers || true;
manageMode = manageMode || false;
if (GlobalVariables.displayCookieNotice) {
if (GlobalVariables.displayCookieNotice && window.cookieconsent) {
cookieconsent.initialise({
palette: {
popup: {