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;