mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +00:00
fix(nuxt3): don't mutate options when unsetting cookie (#2481)
This commit is contained in:
parent
b5618e976b
commit
670a12caaa
@ -59,7 +59,7 @@ function readRawCookies (opts: CookieOptions = {}): Record<string, string> {
|
||||
|
||||
function serializeCookie (name: string, value: any, opts: CookieSerializeOptions = {}) {
|
||||
if (value === null || value === undefined) {
|
||||
opts.maxAge = -1
|
||||
return serialize(name, value, { ...opts, maxAge: -1 })
|
||||
}
|
||||
return serialize(name, value, opts)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user