fix: [main] Prevent setting listeners if dependencies are not loaded
parent
e22068ec90
commit
7f9418639e
|
@ -279,10 +279,12 @@ $(document).ready(() => {
|
||||||
overloadBSDropdown();
|
overloadBSDropdown();
|
||||||
addSupportOfNestedDropdown();
|
addSupportOfNestedDropdown();
|
||||||
|
|
||||||
const debouncedGlobalSearch = debounce(performGlobalSearch, 400)
|
if (window.debounce) {
|
||||||
$('#globalSearch')
|
const debouncedGlobalSearch = debounce(performGlobalSearch, 400)
|
||||||
.keydown(debouncedGlobalSearch)
|
$('#globalSearch')
|
||||||
.keydown(focusSearchResults);
|
.keydown(debouncedGlobalSearch)
|
||||||
|
.keydown(focusSearchResults);
|
||||||
|
}
|
||||||
|
|
||||||
$('.lock-sidebar a.btn-lock-sidebar').click(() => {
|
$('.lock-sidebar a.btn-lock-sidebar').click(() => {
|
||||||
const $sidebar = $('.sidebar')
|
const $sidebar = $('.sidebar')
|
||||||
|
|
Loading…
Reference in New Issue