Merge pull request #91 from bananaappletw/master

Correct way to call yield next
This commit is contained in:
Yiyu He 2016-10-18 15:08:38 +08:00 committed by GitHub
commit 94b2c3fedc

View File

@ -6,7 +6,7 @@ var app = module.exports = koa();
app.use(function* (next){
try {
yield* next;
yield next;
} catch (err) {
if (401 == err.status) {
this.status = 401;