Taichi Masuyama před 4 roky
rodič
revize
a45fe730d8
1 změnil soubory, kde provedl 1 přidání a 3 odebrání
  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);