yohei0125 3 سال پیش
والد
کامیت
b4e6c5d047
1فایلهای تغییر یافته به همراه2 افزوده شده و 3 حذف شده
  1. 2 3
      packages/app/src/server/service/page-operation.ts

+ 2 - 3
packages/app/src/server/service/page-operation.ts

@@ -174,9 +174,8 @@ class PageOperationService {
   getAncestorsPathsByFromAndToPath(fromPath: string, toPath: string): string[] {
     const fromAncestorsPaths = collectAncestorPaths(fromPath);
     const toAncestorsPaths = collectAncestorPaths(toPath);
-    // merge duplicate paths
-    const mergedPaths = Array.from(new Set(toAncestorsPaths.concat(fromAncestorsPaths)));
-    return mergedPaths;
+    // merge duplicate paths and return paths of ancestors
+    return Array.from(new Set(toAncestorsPaths.concat(fromAncestorsPaths)));
   }
 
   async getRenameSubOperationByPageId(pageId: ObjectIdLike): Promise<PageOperationDocument | null> {