diff options
Diffstat (limited to 'assets/js/src/Dropdown.js')
-rw-r--r-- | assets/js/src/Dropdown.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/assets/js/src/Dropdown.js b/assets/js/src/Dropdown.js index 406d0460..20f5b56d 100644 --- a/assets/js/src/Dropdown.js +++ b/assets/js/src/Dropdown.js @@ -52,7 +52,11 @@ Kanboard.Dropdown.prototype.listen = function() { if ($(e.target).is('li')) { KB.trigger('dropdown.clicked'); - $(this).find('a:visible')[0].click(); // Calling native click() not the jQuery one + var element = $(this).find('a:visible'); + + if (element.length > 0) { + element[0].click(); // Calling native click() not the jQuery one + } } }); }; |