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 }