Yuki Takei 9 лет назад
Родитель
Сommit
87579410ff
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/growi-plugin-lsx/src/resource/js/components/PageNode.js

+ 2 - 2
packages/growi-plugin-lsx/src/resource/js/components/PageNode.js

@@ -21,10 +21,10 @@ export class PageNode {
    */
   getDecendantsGenerationsNum() {
     if (this.children.length == 0) {
-      return 0;
+      return -1;
     }
 
-    return -1 + Math.max.apply(null, this.children.map((child) => {
+    return -1 + Math.min.apply(null, this.children.map((child) => {
       return child.getDecendantsGenerationsNum();
     }))
   }