diff --git a/lib/middleware/parameter.js b/lib/middleware/parameter.js index 2b0d69f8c..e2a0b2461 100644 --- a/lib/middleware/parameter.js +++ b/lib/middleware/parameter.js @@ -3,7 +3,7 @@ const he = require('he'); module.exports = async (ctx, next) => { await next(); - if (!ctx._matchedRoute) { + if (!ctx.state.data && !ctx._matchedRoute) { throw Error('wrong path'); }