Fix monitor crash with non-existing node_placement nodes

This commit is contained in:
Vitaliy Filippov
2025-05-05 02:05:04 +03:00
parent ebdb75e287
commit 00ced7cea7
+1 -1
View File
@@ -110,7 +110,7 @@ function make_hier_tree(global_config, tree)
if (!(tree[node_id].children||[]).length && (tree[node_id].size||0) <= 0)
{
const parent = tree[node_id].parent;
if (parent)
if (parent && tree[parent])
{
tree[parent].children = tree[parent].children.filter(c => c != tree[node_id]);
}