From abf838640da21a1565b0a8a2ae0ee399ba3c3b60 Mon Sep 17 00:00:00 2001 From: lucaronin Date: Sun, 22 Feb 2026 09:50:54 +0100 Subject: [PATCH] fix: + buttons for note creation pass MouseEvent as type, causing crash onClick={onCreateNote} passes the React MouseEvent as the first arg to handleCreateNoteImmediate(type?), which treats it as a truthy type string. generateUntitledName then calls .toLowerCase() on the event object, throwing a TypeError and silently aborting note creation. Wrap both NoteList and TabBar onClick handlers to call with no args. Co-Authored-By: Claude Opus 4.6 --- src/components/NoteList.tsx | 2 +- src/components/TabBar.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/NoteList.tsx b/src/components/NoteList.tsx index 87281ded..dc0c2ecf 100644 --- a/src/components/NoteList.tsx +++ b/src/components/NoteList.tsx @@ -611,7 +611,7 @@ function NoteListInner({ entries, selection, selectedNote, allContent, modifiedF