fix: weird typing errors that cropped up

pull/1049/head
Paul Makles 2023-04-21 21:05:29 +01:00
parent d68ffe8ca3
commit e35ef1bc8d
2 changed files with 4 additions and 2 deletions

View File

@ -252,7 +252,7 @@ class ClientController {
// Start client lifecycle
this.addSession(
{
session,
session: session as never,
},
"new",
);

View File

@ -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<API.SessionInfo[] | undefined>(
undefined,