diff --git a/static/js/sidebar.mjs b/static/js/sidebar.mjs index 63c2b75..71a9371 100644 --- a/static/js/sidebar.mjs +++ b/static/js/sidebar.mjs @@ -438,11 +438,6 @@ export class N2Sidebar extends CustomHTMLElement { return currNode }//}}} async recursiveExpand(node, state) {//{{{ - if (!state) { - await this.setNodeExpanded(node, false) - return - } - if (state) await this.setNodeExpanded(node, true) @@ -452,6 +447,9 @@ export class N2Sidebar extends CustomHTMLElement { for (const child of node.Children) await this.recursiveExpand(child, state) + + if (!state) + await this.setNodeExpanded(node, false) }//}}} async makeVisible(node, providedAncestors, dontExpand) {// {{{ const treenode = this.treeNodeComponents[node.UUID]