diff --git a/src/Resources/public/script.js b/src/Resources/public/script.js index f52feca..d77cafc 100644 --- a/src/Resources/public/script.js +++ b/src/Resources/public/script.js @@ -13,6 +13,7 @@ ContaoFlash.registerEventHandlers = function(){ if(!elements.length) return; elements.forEach(function(el){ var close = el.querySelector('.flash-dismiss'); + if(!close) return; close.addEventListener('click', function(e){ e.preventDefault(); var xhr = new XMLHttpRequest();