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
|
@ -4,6 +4,8 @@ function construct_AT(elem, tree) {
|
|||
console.log("constructing ability tree UI");
|
||||
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");
|
||||
|
|
Loading…
Reference in a new issue