Skip to content

Commit

Permalink
docs: fix code syntax (#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
yandongxu authored and dead-horse committed Mar 23, 2017
1 parent 531dadd commit e87c170
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/zh-cn/tutorials/async-function.md
Expand Up @@ -78,7 +78,7 @@ const isJSON = require('koa-is-json');
const zlib = require('zlib');

module.exports = (options, app) => {
return async gzip(ctx, next) => {
return async function gzip(ctx, next) {
// 注意,和 generator function 格式的中间件不同,此时 next 是一个方法,必须要调用它
await next();

Expand Down

0 comments on commit e87c170

Please sign in to comment.