Taichi Masuyama 4 лет назад
Родитель
Сommit
5105581954
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/app/src/server/routes/page.js

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

@@ -168,7 +168,7 @@ module.exports = function(crowi, app) {
   const actions = {};
 
   function getPathFromRequest(req) {
-    return pathUtils.normalizePath(req.params[0] || '');
+    return pathUtils.normalizePath(req.pagePath || req.params[0] || '');
   }
 
   function isUserPage(path) {
@@ -290,7 +290,7 @@ module.exports = function(crowi, app) {
   }
 
   async function _notFound(req, res) {
-    const path = req.pagePath || getPathFromRequest(req);
+    const path = getPathFromRequest(req);
 
     let view;
     const renderVars = { path };