From 614b4e1ad74d96f968bdfe080b6d1f1189a863bb Mon Sep 17 00:00:00 2001 From: Ivan Lyons Date: Mon, 22 Aug 2016 12:21:09 +0800 Subject: [PATCH] `yield` => `await` (#798) --- docs/api/context.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/context.md b/docs/api/context.md index d9dd193..98db161 100644 --- a/docs/api/context.md +++ b/docs/api/context.md @@ -55,7 +55,7 @@ app.use(async (ctx, next) => { The recommended namespace for passing information through middleware and to your frontend views. ```js -ctx.state.user = yield User.find(id); +ctx.state.user = await User.find(id); ``` ### ctx.app