Parcourir la source

Fix move/rename recursively

https://youtrack.weseek.co.jp/issue/GW-7936
- disable removeLeafEmptyPagesRecursively on renameSubOperation
Mudana-Grune il y a 3 ans
Parent
commit
995728c9b8
1 fichiers modifiés avec 0 ajouts et 6 suppressions
  1. 0 6
      packages/app/src/server/service/page.ts

+ 0 - 6
packages/app/src/server/service/page.ts

@@ -561,12 +561,6 @@ class PageService {
     const nToIncrease = (renamedPage.isEmpty ? 0 : 1) + page.descendantCount;
     const nToIncrease = (renamedPage.isEmpty ? 0 : 1) + page.descendantCount;
     await this.updateDescendantCountOfAncestors(renamedPage._id, nToIncrease, false);
     await this.updateDescendantCountOfAncestors(renamedPage._id, nToIncrease, false);
 
 
-    // Remove leaf empty pages if not moving to under the ex-target position
-    if (!this.isRenamingToUnderTarget(page.path, newPagePath)) {
-    // remove empty pages at leaf position
-      await Page.removeLeafEmptyPagesRecursively(page.parent);
-    }
-
     await PageOperation.findByIdAndDelete(pageOpId);
     await PageOperation.findByIdAndDelete(pageOpId);
   }
   }