Shun Miyazawa 4 лет назад
Родитель
Сommit
08e80871bc
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/app/src/server/routes/page.js

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

@@ -900,7 +900,7 @@ module.exports = function(crowi, app) {
    * - If revision_id is not specified => force update by the new contents.
    */
   api.update = async function(req, res) {
-    const pageBody = req.body.body || null;
+    const pageBody = (typeof (req.body.body) === 'string' || req.body.body instanceof String) ? req.body.body : null;
     const pageId = req.body.page_id || null;
     const revisionId = req.body.revision_id || null;
     const grant = req.body.grant || null;