ソースを参照

Reduce change

Taichi Masuyama 4 年 前
コミット
a45fe730d8
1 ファイル変更1 行追加3 行削除
  1. 1 3
      packages/app/src/server/models/page.ts

+ 1 - 3
packages/app/src/server/models/page.ts

@@ -84,9 +84,7 @@ schema.plugin(uniqueValidator);
  * Methods
  */
 const collectAncestorPaths = (path: string, ancestorPaths: string[] = []): string[] => {
-  if (isTopPage(path)) {
-    return ancestorPaths;
-  }
+  if (isTopPage(path)) return ancestorPaths;
 
   const parentPath = nodePath.dirname(path);
   ancestorPaths.push(parentPath);