fixed ipam supernet tree view when there is no data show

This commit is contained in:
alejandro.campos@artica.es 2021-10-25 12:14:21 +02:00
parent b70ca89af2
commit aa24bf545c
1 changed files with 6 additions and 1 deletions

View File

@ -1444,7 +1444,12 @@ var TreeController = {
if (typeof data.auth_hash !== "undefined") {
this.auth_hash = data.auth_hash;
}
if (data.tree[0]["rootType"] == "services") {
if (
typeof data.tree !== "undefined" &&
Array.isArray(data.tree) &&
data.tree.length > 0 &&
data.tree[0]["rootType"] == "services"
) {
this.foundMessage = "";
}
this.load();