mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-21 21:25:11 +00:00
fix(nuxt): reset cookie timeoutLength after expiration (#27632)
This commit is contained in:
parent
ae5806518a
commit
a3d8f005a6
@ -198,6 +198,7 @@ function cookieRef<T> (value: T | undefined, delay: number, shouldWatch: boolean
|
||||
if (shouldWatch) { unsubscribe = watch(internalRef, trigger) }
|
||||
|
||||
function createExpirationTimeout () {
|
||||
elapsed = 0
|
||||
clearTimeout(timeout)
|
||||
const timeRemaining = delay - elapsed
|
||||
const timeoutLength = timeRemaining < MAX_TIMEOUT_DELAY ? timeRemaining : MAX_TIMEOUT_DELAY
|
||||
|
Loading…
Reference in New Issue
Block a user