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

@@ -86,8 +86,8 @@ async function createNote(parentNotePath: string | undefined, options: CreateNot
await ws.waitForMaxKnownEntityChangeId();
if (options.activate) {
const activeNoteContext = appContext.tabManager.getActiveContext();
const activeNoteContext = appContext.tabManager.getActiveContext();
if (activeNoteContext && options.activate) {
await activeNoteContext.setNote(`${parentNotePath}/${note.noteId}`);
if (options.focus === "title") {
@@ -152,8 +152,7 @@ async function duplicateSubtree(noteId: string, parentNotePath: string) {
await ws.waitForMaxKnownEntityChangeId();
const activeNoteContext = appContext.tabManager.getActiveContext();
activeNoteContext.setNote(`${parentNotePath}/${note.noteId}`);
appContext.tabManager.getActiveContext()?.setNote(`${parentNotePath}/${note.noteId}`);
const origNote = await froca.getNote(noteId);
toastService.showMessage(t("note_create.duplicated", { title: origNote?.title }));