Skip to content

Commit

Permalink
fix: add check for req object on getCookie (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyLeite authored and pi0 committed Apr 10, 2018
1 parent c1b4cfd commit 7d17f75
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) {
if (!this.options.cookie || !this.ctx.req) {
return
}

Expand Down

0 comments on commit 7d17f75

Please sign in to comment.