Parcourir la source

fix getPathFromRequest when the pathname is `/${ObjectId like string}`

Yuki Takei il y a 3 ans
Parent
commit
c908574939
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      packages/app/src/server/routes/page.js

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

@@ -170,7 +170,7 @@ module.exports = function(crowi, app) {
   const actions = {};
 
   function getPathFromRequest(req) {
-    return pathUtils.normalizePath(req.pagePath || req.params[0] || '');
+    return pathUtils.normalizePath(req.pagePath || req.params[0] || req.params.id || '');
   }
 
   function generatePager(offset, limit, totalCount) {