From 1c8322d071ff4831bfe80d92445b502cfcca0e6f Mon Sep 17 00:00:00 2001 From: Hugo Meyronneinc Date: Sun, 22 Apr 2018 00:51:04 +0900 Subject: [PATCH] fix: Storage cookie get on client side --- 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 19b69cd41..bfbe42a81 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 || !this.ctx.req) { + if (!this.options.cookie || (process.server && !this.ctx.req)) { return }