Taichi Masuyama hace 4 años
padre
commit
913d0c88a4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/app/src/server/routes/apiv3/pages.js

+ 1 - 1
packages/app/src/server/routes/apiv3/pages.js

@@ -629,7 +629,7 @@ module.exports = (crowi) => {
 
     const page = await Page.findByIdAndViewerToEdit(pageId, req.user, true);
 
-    const isEmptyAndNotRecursively = page.isEmpty && isRecursively;
+    const isEmptyAndNotRecursively = page?.isEmpty && isRecursively;
     if (page == null || isEmptyAndNotRecursively) {
       res.code = 'Page is not found';
       logger.error('Failed to find the pages');