feat(client/ts): port note_title

This commit is contained in:
Elian Doran
2025-01-28 14:07:56 +02:00
parent 55ce673f1b
commit 15c63f52dc
4 changed files with 27 additions and 17 deletions

View File

@@ -10,9 +10,9 @@ import type NoteContext from "../components/note_context.js";
class NoteContextAwareWidget extends BasicWidget {
protected noteContext?: NoteContext;
isNoteContext(ntxId: string | null | undefined) {
isNoteContext(ntxId: string | string[] | null | undefined) {
if (Array.isArray(ntxId)) {
return this.noteContext && ntxId.includes(this.noteContext.ntxId);
return this.noteContext && this.noteContext.ntxId && ntxId.includes(this.noteContext.ntxId);
} else {
return this.noteContext && this.noteContext.ntxId === ntxId;
}