Shun Miyazawa 4 лет назад
Родитель
Сommit
bf7edacd10
2 измененных файлов с 7 добавлено и 7 удалено
  1. 6 6
      packages/app/src/components/PageDeleteModal.tsx
  2. 1 1
      packages/app/src/server/routes/page.js

+ 6 - 6
packages/app/src/components/PageDeleteModal.tsx

@@ -70,8 +70,8 @@ const PageDeleteModal: FC<Props> = (props: Props) => {
       try {
       try {
         // control flag
         // control flag
         // If is it not true, Request value must be `null`.
         // If is it not true, Request value must be `null`.
-        const recursively = isDeleteRecursively != true ? true : null;
-        const completely = isDeleteCompletely != true  ? true : null;
+        const recursively = isDeleteRecursively !== true ? true : null;
+        const completely = isDeleteCompletely !== true ? true : null;
 
 
         const result = await apiPost('/pages.remove', {
         const result = await apiPost('/pages.remove', {
           page_id: pageToDelete.pageId,
           page_id: pageToDelete.pageId,
@@ -83,10 +83,10 @@ const PageDeleteModal: FC<Props> = (props: Props) => {
         const trashPagePath = result.page.path;
         const trashPagePath = result.page.path;
 
 
         window.location.href = encodeURI(trashPagePath);
         window.location.href = encodeURI(trashPagePath);
-    }
-    catch (err) {
-      setErrs(err);
-    }
+      }
+      catch (err) {
+        setErrs(err);
+      }
     }
     }
   }
   }
 
 

+ 1 - 1
packages/app/src/server/routes/page.js

@@ -1230,7 +1230,7 @@ module.exports = function(crowi, app) {
     const result = {};
     const result = {};
     result.page = page; // TODO consider to use serializePageSecurely method -- 2018.08.06 Yuki Takei
     result.page = page; // TODO consider to use serializePageSecurely method -- 2018.08.06 Yuki Takei
 
 
-    return res.json(ApiResponse.success(result));
+    res.json(ApiResponse.success(result));
 
 
     try {
     try {
       // global notification
       // global notification