From 306b3a9e8b827ac965ee858cec19ea26260833e7 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 --- js/src/common/Application.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/common/Application.tsx b/js/src/common/Application.tsx index 835a75363..3dc7b8259 100644 --- a/js/src/common/Application.tsx +++ b/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();