2
0
Эх сурвалжийг харах

refactor how to get a nonEmptyPage

yohei0125 3 жил өмнө
parent
commit
7bbe12a300

+ 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);
     }