From 4d58ff06f32290c63456de2bad2257aac79cb0be Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Fri, 21 Apr 2023 21:05:29 +0100 Subject: [PATCH] fix: weird typing errors that cropped up --- src/controllers/client/ClientController.tsx | 2 +- src/pages/settings/panes/Sessions.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/controllers/client/ClientController.tsx b/src/controllers/client/ClientController.tsx index d5024187..72646f54 100644 --- a/src/controllers/client/ClientController.tsx +++ b/src/controllers/client/ClientController.tsx @@ -252,7 +252,7 @@ class ClientController { // Start client lifecycle this.addSession( { - session, + session: session as never, }, "new", ); diff --git a/src/pages/settings/panes/Sessions.tsx b/src/pages/settings/panes/Sessions.tsx index c2fab342..5af1ae3e 100644 --- a/src/pages/settings/panes/Sessions.tsx +++ b/src/pages/settings/panes/Sessions.tsx @@ -38,7 +38,9 @@ dayjs.extend(relativeTime); export function Sessions() { const client = useClient(); const deviceId = - typeof client.session === "object" ? client.session._id : undefined; + typeof client.session === "object" + ? (client.session as unknown as { _id: string })._id + : undefined; const [sessions, setSessions] = useState( undefined,