Skip to content

Commit

Permalink
Fix bug with navigation collapsing
Browse files Browse the repository at this point in the history
  • Loading branch information
irskep committed Sep 7, 2024
1 parent 94e5a21 commit 887a52d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clientjs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ window.onload = () => {
document.querySelectorAll(".DJCollapse_Collapser").forEach((el) => {
const targetID = (el as HTMLElement).dataset.collapseTarget;
el.addEventListener("click", (e) => {
const target = document.querySelector(`#${targetID}`);
const target = el.parentElement?.querySelector(`#${targetID}`);
if (!target) {
console.error("Can't find", `#${targetID}`);
return;
Expand Down

0 comments on commit 887a52d

Please sign in to comment.