From 24b169d667248f0043b268e49348cd72d2bd4560 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 9 Nov 2025 13:52:07 +0200 Subject: [PATCH] fix(type_widgets): "empty" note type displayed on refresh --- apps/client/src/widgets/NoteDetail.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/client/src/widgets/NoteDetail.tsx b/apps/client/src/widgets/NoteDetail.tsx index fd49fb624..8d5845018 100644 --- a/apps/client/src/widgets/NoteDetail.tsx +++ b/apps/client/src/widgets/NoteDetail.tsx @@ -277,10 +277,10 @@ async function getCorrespondingWidget(type: ExtendedNoteType): Promise { +async function getWidgetType(note: FNote | null | undefined, noteContext: NoteContext | undefined): Promise { if (!note) { - console.log("Returning empty because no note."); - return "empty"; + // If the note is null, then it's a new tab. If it's undefined, then it's not loaded yet. + return note === null ? "empty" : undefined; } const type = note.type;