From 5552db034bfc1c456fe53463cfc151cd2e239d34 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 7 Feb 2025 22:37:43 +0200 Subject: [PATCH] fix(client): regression in new tab --- src/public/app/components/app_context.ts | 2 +- src/public/app/widgets/note_detail.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/public/app/components/app_context.ts b/src/public/app/components/app_context.ts index 5582efb69..0b0139a3a 100644 --- a/src/public/app/components/app_context.ts +++ b/src/public/app/components/app_context.ts @@ -256,7 +256,7 @@ type EventMappings = { }; noteSwitched: { noteContext: NoteContext; - notePath: string | null; + notePath?: string | null; }; noteSwitchedAndActivatedEvent: { noteContext: NoteContext; diff --git a/src/public/app/widgets/note_detail.ts b/src/public/app/widgets/note_detail.ts index 6a0f64c58..35546de91 100644 --- a/src/public/app/widgets/note_detail.ts +++ b/src/public/app/widgets/note_detail.ts @@ -156,7 +156,7 @@ export default class NoteDetailWidget extends NoteContextAwareWidget { } // this is happening in update(), so note has been already set, and we need to reflect this - if (this.noteContext && this.noteContext.notePath) { + if (this.noteContext) { await typeWidget.handleEvent("noteSwitched", { noteContext: this.noteContext, notePath: this.noteContext.notePath