diff --git a/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/domain/ResourceTreeNode.java b/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/domain/ResourceTreeNode.java index fa2e7ca9..be576160 100755 --- a/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/domain/ResourceTreeNode.java +++ b/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/domain/ResourceTreeNode.java @@ -56,7 +56,7 @@ public class ResourceTreeNode { ResourceTreeNode node = fromNodeVo(vo); map.put(node.id, node); // real root - if (node.parentId == null) { + if (node.parentId == null || node.parentId.isEmpty()) { root = node; } else if (map.containsKey(node.parentId)) { map.get(node.parentId).children.add(node);