diff --git a/packages/nuxt/src/app/composables/cookie.ts b/packages/nuxt/src/app/composables/cookie.ts index 7f5b6cd267..bdc9d93782 100644 --- a/packages/nuxt/src/app/composables/cookie.ts +++ b/packages/nuxt/src/app/composables/cookie.ts @@ -198,6 +198,7 @@ function cookieRef (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 diff --git a/packages/nuxt/src/components/islandsTransform.ts b/packages/nuxt/src/components/islandsTransform.ts index ac5a954932..e10f1cd957 100644 --- a/packages/nuxt/src/components/islandsTransform.ts +++ b/packages/nuxt/src/components/islandsTransform.ts @@ -28,7 +28,7 @@ const SCRIPT_RE = /]*>/g const HAS_SLOT_OR_CLIENT_RE = /]*>|nuxt-client/ const TEMPLATE_RE = / + + +`, 'hello.server.vue') + + expect(normalizeLineEndings(result)).toMatchInlineSnapshot(` + " + + + " + `) + }) + it('expect slot fallback transform to match inline snapshot', async () => { const result = await viteTransform(`