fix: wrong path judgement

This commit is contained in:
DIYgod 2019-06-19 19:01:44 +08:00
parent b9ab52a0d5
commit 2f1aeb4d84
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
1 changed files with 1 additions and 1 deletions

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