Explorar o código

refactor how to get a nonEmptyPage

yohei0125 %!s(int64=3) %!d(string=hai) anos
pai
achega
7bbe12a300
Modificáronse 1 ficheiros con 1 adicións e 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);
     }