Taichi Masuyama 4 ani în urmă
părinte
comite
b80c98310a
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      packages/app/src/server/service/page.ts

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

@@ -1065,14 +1065,14 @@ class PageService {
       // replace with an empty page
       // replace with an empty page
       const shouldReplace = await Page.exists({ parent: page._id });
       const shouldReplace = await Page.exists({ parent: page._id });
       if (shouldReplace) {
       if (shouldReplace) {
-        await Page.replaceTargetWithPage(page);
+        await Page.replaceTargetWithPage(page, null, true);
       }
       }
 
 
       // update descendantCount of ancestors'
       // update descendantCount of ancestors'
       await this.updateDescendantCountOfAncestors(page.parent, -1, true);
       await this.updateDescendantCountOfAncestors(page.parent, -1, true);
 
 
       // delete leaf empty pages
       // delete leaf empty pages
-      await this.removeLeafEmptyPages(page, null, true);
+      await this.removeLeafEmptyPages(page);
     }
     }
 
 
     let deletedPage;
     let deletedPage;