From a8c56122fdc577ca9fba1011f214c7af2e77209d Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Sun, 12 Dec 2021 15:39:06 -0500 Subject: [PATCH] Type-safe session instantiation --- framework/core/js/src/common/Application.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/js/src/common/Application.tsx b/framework/core/js/src/common/Application.tsx index 835a75363..3dc7b8259 100644 --- a/framework/core/js/src/common/Application.tsx +++ b/framework/core/js/src/common/Application.tsx @@ -258,7 +258,7 @@ export default class Application { this.forum = this.store.getById('forums', '1')!; - this.session = new Session(this.store.getById('users', String(this.data.session.userId)), this.data.session.csrfToken); + this.session = new Session(this.store.getById('users', String(this.data.session.userId)) ?? null, this.data.session.csrfToken); this.mount();