fix: [main] Prevent setting listeners if dependencies are not loaded

pull/85/head
Sami Mokaddem 2021-12-20 15:26:36 +01:00
parent e22068ec90
commit 7f9418639e
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 6 additions and 4 deletions

View File

@ -279,10 +279,12 @@ $(document).ready(() => {
overloadBSDropdown();
addSupportOfNestedDropdown();
if (window.debounce) {
const debouncedGlobalSearch = debounce(performGlobalSearch, 400)
$('#globalSearch')
.keydown(debouncedGlobalSearch)
.keydown(focusSearchResults);
}
$('.lock-sidebar a.btn-lock-sidebar').click(() => {
const $sidebar = $('.sidebar')