Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
docs: fix typo (#4028)
  • Loading branch information
pixcai authored and atian25 committed Nov 5, 2019
1 parent 3930e45 commit 6c55a43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/source/en/basics/controller.md
Expand Up @@ -613,7 +613,7 @@ Through `ctx.cookies`, we can conveniently and safely set and get Cookie in Cont
class CookieController extends Controller {
async add() {
const ctx = this.ctx;
const count = ctx.cookies.get('count');
let count = ctx.cookies.get('count');
count = count ? Number(count) : 0;
ctx.cookies.set('count', ++count);
ctx.body = count;
Expand Down
2 changes: 1 addition & 1 deletion docs/source/zh-cn/basics/controller.md
Expand Up @@ -613,7 +613,7 @@ HTTP 请求都是无状态的,但是我们的 Web 应用通常都需要知道
class CookieController extends Controller {
async add() {
const ctx = this.ctx;
const count = ctx.cookies.get('count');
let count = ctx.cookies.get('count');
count = count ? Number(count) : 0;
ctx.cookies.set('count', ++count);
ctx.body = count;
Expand Down

0 comments on commit 6c55a43

Please sign in to comment.