Shun Miyazawa 4 lat temu
rodzic
commit
bf7edacd10

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

@@ -70,8 +70,8 @@ const PageDeleteModal: FC<Props> = (props: Props) => {
       try {
         // control flag
         // 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', {
           page_id: pageToDelete.pageId,
@@ -83,10 +83,10 @@ const PageDeleteModal: FC<Props> = (props: Props) => {
         const trashPagePath = result.page.path;
 
         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 = {};
     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 {
       // global notification