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

View file

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