Explorar el Código

refactor how to get a nonEmptyPage

yohei0125 hace 3 años
padre
commit
7bbe12a300
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/app/src/server/routes/page.js

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

@@ -630,7 +630,7 @@ module.exports = function(crowi, app) {
     }
 
     if (nonEmptyPages.length === 1) {
-      const nonEmptyPage = pages.find(p => !p.isEmpty); // find the nonEmpty Page
+      const nonEmptyPage = nonEmptyPages[0];
       return redirectOperationForSinglePage(nonEmptyPage, req, res);
     }