From e57275fe2bff66c853a6ba146e10341059715916 Mon Sep 17 00:00:00 2001 From: "Ismail H. Ayaz" Date: Tue, 21 Sep 2021 20:57:17 +0300 Subject: [PATCH] fix: koa middleware fails with async --- src/cookies.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cookies.ts b/src/cookies.ts index b2e55e7..0726288 100644 --- a/src/cookies.ts +++ b/src/cookies.ts @@ -187,8 +187,8 @@ export class Cookies { = ctx.req.cookies = ctx.res.cookies = ctx.request.cookies - = ctx.response.cookies = new Cookies(ctx.req, ctx.res, options) - next() + = ctx.response.cookies = new Cookies(ctx.req, ctx.res, options); + return next() } }