Explorar el Código

Update page.js

深瀬スティーヴン hace 5 años
padre
commit
a54f28c029
Se han modificado 1 ficheros con 6 adiciones y 6 borrados
  1. 6 6
      src/server/service/page.js

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

@@ -635,9 +635,9 @@ class PageService {
       const toPath = Page.getRevertDeletedPageName(page.path);
 
       if (pathToPageMapping[toPath] != 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 (pathToPageMapping[toPath].redirectTo === page.path) {
           removePageBulkOp.find({ path: toPath }).remove();
         }
@@ -669,9 +669,9 @@ class PageService {
     const newPath = Page.getRevertDeletedPageName(page.path);
     const originPage = await Page.findByPath(newPath);
     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) {
         throw new Error('The new page of to revert is exists and the redirect path of the page is not the deleted page.');
       }