Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
refactor(popup_editor): use simpler mechanism for retrieving note ID
Elian Doran7ecdee7a8925
diff --git a/apps/client/src/widgets/dialogs/PopupEditor.tsx b/apps/client/src/widgets/dialogs/PopupEditor.tsxindex abfa8ba5f5..53d5430027 100644--- a/apps/client/src/widgets/dialogs/PopupEditor.tsx+++ b/apps/client/src/widgets/dialogs/PopupEditor.tsx@@ -30,10 +30,8 @@ export default function PopupEditor() {useTriliumEvent("openInPopup", async ({ noteIdOrPath }) => {const noteContext = new NoteContext("_popup-editor");- const resolvedNotePath = await tree.resolveNotePath(noteIdOrPath, noteContext.hoistedNoteId);- if (!resolvedNotePath) return;- const noteId = tree.getNoteIdAndParentIdFromUrl(resolvedNotePath);+ const noteId = tree.getNoteIdAndParentIdFromUrl(noteIdOrPath);if (!noteId.noteId) return;const note = await froca.getNote(noteId.noteId);if (!note) return;