From 5fde5faacbfd653375ab79827a53ef659ae3559c Mon Sep 17 00:00:00 2001 From: hppeng Date: Mon, 27 Jun 2022 01:32:26 -0700 Subject: [PATCH] really minor code cleanup --- js/atree.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/js/atree.js b/js/atree.js index 47e80b3..099715a 100644 --- a/js/atree.js +++ b/js/atree.js @@ -56,17 +56,14 @@ const atree_render = new (class extends ComputeNode { //as of now, we NEED to have the dropdown tab visible/not hidden in order to properly display atree stuff. // TODO: FIXME! this is a side effect of `px` based rendering. if (!document.getElementById("toggle-atree").classList.contains("toggleOn")) { - toggle_tab('atree-dropdown'); - toggleButton('toggle-atree'); + toggle_tab('atree-dropdown'); toggleButton('toggle-atree'); } //for some reason we have to cast to string if (atree) { render_AT(document.getElementById("atree-ui"), atree); } - if (document.getElementById("toggle-atree").classList.contains("toggleOn")) { - toggle_tab('atree-dropdown'); - toggleButton('toggle-atree'); - } + //Toggle on, previously was toggled off + toggle_tab('atree-dropdown'); toggleButton('toggle-atree'); } })();