This commit is contained in:
TJ Holowaychuk 2013-09-02 19:18:37 -07:00
parent 74c452a93f
commit 6eb92c3bd1
1 changed files with 5 additions and 5 deletions

View File

@ -54,11 +54,11 @@ app.use(function(next){
13. Hand off to Koa to handle the response 13. Hand off to Koa to handle the response
Note that the final middleware (step __6__) yields to what looks to be nothing - it's actually Note that the final middleware (step __6__) yields to what looks to be nothing - it's actually
yielding to a no-op generator within Koa. This is so that every middleware can conform with the yielding to a no-op generator within Koa. This is so that every middleware can conform with the
same API, and may be placed before or after others. If you removed `yield next;` from the furthest same API, and may be placed before or after others. If you removed `yield next;` from the furthest
"downstream" middleware everything would function appropritaely, however it would no longer conform "downstream" middleware everything would function appropritaely, however it would no longer conform
to this behaviour. to this behaviour.
For example this would be fine: For example this would be fine: