fix: don't throw when session manager isn't available
This commit is contained in:
parent
539c76dfb3
commit
d524f927a4
@ -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>({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user