mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-08 02:31:36 +02:00
fix checkVisibility being called on null
This commit is contained in:
parent
d8af31c8cb
commit
8159f65062
1 changed files with 6 additions and 2 deletions
|
@ -24,8 +24,12 @@
|
|||
//
|
||||
// Can't inline this into the `hx-trigger` above because using a left-brace ('[') breaks htmx's trigger parsing.
|
||||
function noActiveDropdowns() {
|
||||
return document.querySelector('[aria-expanded=true]') === null &&
|
||||
!document.querySelector('#branch-dropdown-form').checkVisibility();
|
||||
if (document.querySelector('[aria-expanded=true]') !== null)
|
||||
return false;
|
||||
const dropdownForm = document.querySelector('#branch-dropdown-form');
|
||||
if (dropdownForm !== null && dropdownForm.checkVisibility())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue