Skip to content

Commit 323346e

Browse files
Yama-Tomopi0
authored andcommitted
fix: set-cookie header contains undefined value (#372)
1 parent b76ff7d commit 323346e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/core/storage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export default class Storage {
227227
} else if (process.server && this.ctx.res) {
228228
// Send Set-Cookie header from server side
229229
const prevCookies = this.ctx.res.getHeader('Set-Cookie')
230-
this.ctx.res.setHeader('Set-Cookie', [].concat(prevCookies, serializedCookie))
230+
this.ctx.res.setHeader('Set-Cookie', [].concat(prevCookies, serializedCookie).filter(v => v))
231231
}
232232

233233
return value

0 commit comments

Comments
 (0)