mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 08:45:50 +01:00
feat(client/ts): port note_title
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user