From 7d17f75bf211f9a3ebae95d6d0dedce76c086c1b Mon Sep 17 00:00:00 2001 From: Rodrigo Leite Date: Tue, 10 Apr 2018 16:09:50 -0300 Subject: [PATCH] fix: add check for req object on getCookie (#132) --- lib/core/storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/storage.js b/lib/core/storage.js index a99720dae..19b69cd41 100644 --- a/lib/core/storage.js +++ b/lib/core/storage.js @@ -183,7 +183,7 @@ export default class Storage { } getCookie (key, isJson) { - if (!this.options.cookie) { + if (!this.options.cookie || !this.ctx.req) { return }