chore: 🤖 fix webpack build error

This commit is contained in:
Jin
2025-03-03 21:02:18 +01:00
parent 2213c500c2
commit 1b76442367
19 changed files with 81 additions and 53 deletions

View File

@@ -424,10 +424,10 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
const activeNoteContext = appContext.tabManager.getActiveContext();
const opts: SetNoteOpts = {};
if (activeNoteContext.viewScope?.viewMode === "contextual-help") {
if (activeNoteContext?.viewScope?.viewMode === "contextual-help") {
opts.viewScope = activeNoteContext.viewScope;
}
await activeNoteContext.setNote(notePath, opts);
await activeNoteContext?.setNote(notePath, opts);
},
expand: (event, data) => this.setExpanded(data.node.data.branchId, true),
collapse: (event, data) => this.setExpanded(data.node.data.branchId, false),
@@ -619,10 +619,10 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
// TODO: Deduplicate with server's notes.ts#getAndValidateParent
if (!["search", "launcher"].includes(note.type)
&& !note.isOptions()
&& !note.isLaunchBarConfig()
&& !note.noteId.startsWith("_help")
) {
&& !note.isOptions()
&& !note.isLaunchBarConfig()
&& !note.noteId.startsWith("_help")
) {
const $createChildNoteButton = $(`<span class="tree-item-button add-note-button bx bx-plus" title="${t("note_tree.create-child-note")}"></span>`).on(
"click",
cancelClickPropagation
@@ -1758,6 +1758,6 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
await ws.waitForMaxKnownEntityChangeId();
appContext.tabManager.getActiveContext().setNote(resp.note.noteId);
appContext.tabManager.getActiveContext()?.setNote(resp.note.noteId);
}
}