Skip to content

Commit 7d17f75

Browse files
SkyLeitepi0
authored andcommitted
fix: add check for req object on getCookie (#132)
1 parent c1b4cfd commit 7d17f75

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/core/storage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export default class Storage {
183183
}
184184

185185
getCookie (key, isJson) {
186-
if (!this.options.cookie) {
186+
if (!this.options.cookie || !this.ctx.req) {
187187
return
188188
}
189189

0 commit comments

Comments
 (0)