Skip to content

Commit

Permalink
No event handler if no dismiss link
Browse files Browse the repository at this point in the history
  • Loading branch information
saibotd authored Mar 18, 2019
1 parent 07eefcc commit e73dbc8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Resources/public/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit e73dbc8

Please sign in to comment.