refactor(popup_editor): use simpler mechanism for retrieving note ID

This commit is contained in:
Elian Doran 2025-11-25 08:24:26 +02:00
parent 24361ccd97
commit 7ecdee7a89
No known key found for this signature in database

View File

@ -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;