mirror of
https://github.com/tale/headplane.git
synced 2026-08-29 16:37:10 +00:00
fix: don't throw when session manager isn't available
This commit is contained in:
@@ -24,7 +24,7 @@ type SessionStore = SessionStorage<SessionData, SessionFlashData>;
|
|||||||
let sessionStorage: SessionStore | null = null;
|
let sessionStorage: SessionStore | null = null;
|
||||||
export function initSessionManager() {
|
export function initSessionManager() {
|
||||||
if (sessionStorage) {
|
if (sessionStorage) {
|
||||||
throw new Error('Session manager already initialized');
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sessionStorage = createCookieSessionStorage<SessionData, SessionFlashData>({
|
sessionStorage = createCookieSessionStorage<SessionData, SessionFlashData>({
|
||||||
|
|||||||
Reference in New Issue
Block a user