Sfoglia il codice sorgente

Improve empty parentId handling logic in FetchJsonTreeCommandHandler (#1140)

- Treat as root node when parentId is empty string in FetchJsonTreeCommandHandler
master
李火亮 Eric Zhao 5 anni fa
parent
commit
7c2c137f6f
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/domain/ResourceTreeNode.java

+ 1
- 1
sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/domain/ResourceTreeNode.java Vedi File

@@ -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);


Loading…
Annulla
Salva