update cookies that have no expiration
This commit is contained in:
parent
9eb6700399
commit
40f8b3ee0c
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ export function updateCookie(cookie, headers) {
|
||||||
), values = {}
|
), values = {}
|
||||||
|
|
||||||
cookie.unset(parsed.filter(c => c.expires < new Date()).map(c => c.name));
|
cookie.unset(parsed.filter(c => c.expires < new Date()).map(c => c.name));
|
||||||
parsed.filter(c => c.expires > new Date()).forEach(c => values[c.name] = c.value);
|
parsed.filter(c => !c.expires || c.expires > new Date()).forEach(c => values[c.name] = c.value);
|
||||||
|
|
||||||
cookie.set(values);
|
cookie.set(values);
|
||||||
if (Object.keys(values).length) dirty = true
|
if (Object.keys(values).length) dirty = true
|
||||||
|
|
Loading…
Reference in a new issue