Browse Source

Update page.js

深瀬スティーヴン 5 năm trước cách đây
mục cha
commit
9cb1c5f42e
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      src/server/service/page.js

+ 3 - 3
src/server/service/page.js

@@ -669,9 +669,9 @@ class PageService {
     const newPath = Page.getRevertDeletedPageName(page.path);
     const newPath = Page.getRevertDeletedPageName(page.path);
     const originPage = await Page.findByPath(newPath);
     const originPage = await Page.findByPath(newPath);
     if (originPage != null) {
     if (originPage != null) {
-      // When the page is deleted, it will always be created with "redirectTo" in the path of the original page.
-      // So, it's ok to delete the page
-      // However, If a page exists that is not "redirectTo", something is wrong. (Data correction is needed).
+    // When the page is deleted, it will always be created with "redirectTo" in the path of the original page.
+    // So, it's ok to delete the page
+    // However, If a page exists that is not "redirectTo", something is wrong. (Data correction is needed).
       if (originPage.redirectTo !== page.path) {
       if (originPage.redirectTo !== page.path) {
         throw new Error('The new page of to revert is exists and the redirect path of the page is not the deleted page.');
         throw new Error('The new page of to revert is exists and the redirect path of the page is not the deleted page.');
       }
       }