mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-02 04:01:43 +02:00
web: fix crash when note has no title
This commit is contained in:
@@ -61,10 +61,10 @@ function TitleBox(props: TitleBoxProps) {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const { title = "" } = useStore.getState().session;
|
||||
const { title } = useStore.getState().session;
|
||||
if (!inputRef.current) return;
|
||||
inputRef.current.value = title;
|
||||
updateFontSize(title.length);
|
||||
inputRef.current.value = title || "";
|
||||
updateFontSize(title?.length || 0);
|
||||
}, [id, updateFontSize]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user