catch if given atree does not exist
This commit is contained in:
parent
32ee15dc2b
commit
cba1bb5eb0
1 changed files with 2 additions and 0 deletions
|
@ -5,6 +5,8 @@ function construct_AT(elem, tree) {
|
|||
document.getElementById("atree-active").innerHTML = ""; //reset all atree actives - should be done in a more general way later
|
||||
elem.innerHTML = ""; //reset the atree in the DOM
|
||||
|
||||
if (tree === undefined) {return false;}
|
||||
|
||||
// add in the "Active" title to atree
|
||||
let active_row = document.createElement("div");
|
||||
active_row.classList.add("row", "item-title", "mx-auto", "justify-content-center");
|
||||
|
|
Loading…
Reference in a new issue