mirror of
https://github.com/koajs/examples.git
synced 2026-01-25 14:48:15 +00:00
Merge pull request #91 from bananaappletw/master
Correct way to call yield next
This commit is contained in:
commit
94b2c3fedc
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user