fix: wrong path judgement

This commit is contained in:
DIYgod
2019-06-19 19:01:44 +08:00
parent b9ab52a0d5
commit 2f1aeb4d84

View File

@@ -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');
}