From 9af5802cd214de9c84420c253688cf4af10f9008 Mon Sep 17 00:00:00 2001 From: JosiasAurel Date: Fri, 31 May 2024 14:10:09 +0100 Subject: [PATCH] disable ai help if not logged in session will resolve to undefined due to optional chaining which does not equal null so the ai help will not be disabled even if the user is not logged in. with this new change, we're directly comparing the session which will be null if the user is not logged in --- src/components/popups-etc/help.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/popups-etc/help.tsx b/src/components/popups-etc/help.tsx index e9d6640091..a615abbf8b 100644 --- a/src/components/popups-etc/help.tsx +++ b/src/components/popups-etc/help.tsx @@ -130,7 +130,7 @@ export default function Help(props: HelpProps) { showingChat.value ? styles.selected : "" }`} disabled={ - props.persistenceState?.value.session?.user === null + props.persistenceState?.value.session === null } onClick={() => { showingChat.value = true;