From 2f13ec51f3e22a373bc6268593cc59a4ca6434aa Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Thu, 26 Jun 2025 10:50:34 +0500 Subject: [PATCH] web: only subscribe to note title if its generated --- apps/web/src/components/editor/title-box.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/editor/title-box.tsx b/apps/web/src/components/editor/title-box.tsx index 968ce6a4d..c4b8793f5 100644 --- a/apps/web/src/components/editor/title-box.tsx +++ b/apps/web/src/components/editor/title-box.tsx @@ -39,9 +39,10 @@ function TitleBox(props: TitleBoxProps) { const inputRef = useRef(null); const pendingChanges = useRef(false); const sessionType = useEditorStore((store) => store.getSession(id)?.type); - const sessionTitle = useEditorStore( - (store) => store.getSession(id, ["default"])?.note.title - ); + const sessionTitle = useEditorStore((store) => { + const session = store.getSession(id, ["default"]); + return session?.note.isGeneratedTitle ? session.note.title : null; + }); const { editorConfig } = useEditorConfig(); const dateFormat = useSettingsStore((store) => store.dateFormat); const timeFormat = useSettingsStore((store) => store.timeFormat);