Skip to content

Commit

Permalink
fix: storage cookie get on client side (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugome authored and pi0 committed Apr 25, 2018
1 parent ca5e4b0 commit 8275e60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 8275e60

Please sign in to comment.