yohei0125 4 سال پیش
والد
کامیت
efe64bd43b
1فایلهای تغییر یافته به همراه4 افزوده شده و 8 حذف شده
  1. 4 8
      packages/app/src/server/service/page.ts

+ 4 - 8
packages/app/src/server/service/page.ts

@@ -687,13 +687,6 @@ class PageService {
       );
       );
     }
     }
 
 
-    if (isRecursively) {
-      (async() => {
-        const descendantCountAppliedToAncestors = await this.duplicateDescendantsWithStream(page, newPagePath, user, shouldUseV4Process);
-        await this.updateDescendantCountOfAncestors(createdPage._id, descendantCountAppliedToAncestors, false);
-      })();
-    }
-
     // take over tags
     // take over tags
     const originTags = await page.findRelatedTagsById();
     const originTags = await page.findRelatedTagsById();
     let savedTags = [];
     let savedTags = [];
@@ -708,7 +701,10 @@ class PageService {
 
 
     // TODO: resume
     // TODO: resume
     if (isRecursively) {
     if (isRecursively) {
-      this.duplicateDescendantsWithStream(page, newPagePath, user, shouldUseV4Process);
+      (async() => {
+        const descendantCountAppliedToAncestors = await this.duplicateDescendantsWithStream(page, newPagePath, user, shouldUseV4Process);
+        await this.updateDescendantCountOfAncestors(createdPage._id, descendantCountAppliedToAncestors, false);
+      })();
     }
     }
 
 
     return result;
     return result;