Skip to content

Build your personal knowledge base with Trilium Notes

fix(client): regression in new tab

Elian Doran5552db034bfc
diff --git a/src/public/app/components/app_context.ts b/src/public/app/components/app_context.ts
index 5582efb696..0b0139a3ad 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 6a0f64c583..35546de919 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