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> {