fix: don't throw when session manager isn't available

This commit is contained in:
Aarnav Tale 2025-01-18 07:39:09 +00:00
parent 539c76dfb3
commit d524f927a4
No known key found for this signature in database

View File

@ -24,7 +24,7 @@ type SessionStore = SessionStorage<SessionData, SessionFlashData>;
let sessionStorage: SessionStore | null = null;
export function initSessionManager() {
if (sessionStorage) {
throw new Error('Session manager already initialized');
return;
}
sessionStorage = createCookieSessionStorage<SessionData, SessionFlashData>({