From b06af08f6ba3e4dd98411c73298238130c5729d4 Mon Sep 17 00:00:00 2001 From: Chris Kanich Date: Mon, 30 Dec 2024 10:32:53 -0600 Subject: [PATCH] fix: session regeneration --- packages/astro/src/core/session.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/astro/src/core/session.ts b/packages/astro/src/core/session.ts index 9ac7327c59e2..33117a47a0e2 100644 --- a/packages/astro/src/core/session.ts +++ b/packages/astro/src/core/session.ts @@ -182,9 +182,8 @@ export class AstroSession { const oldSessionId = this.#sessionID; // Create new session - this.#sessionID = undefined; + this.#sessionID = crypto.randomUUID(); this.#data = data; - this.#ensureSessionID(); await this.#setCookie(); // Clean up old session asynchronously