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
test(commons): drop the unreachable fallback in parseMindMapNoteLink
Elian Doran4c0f01ec912a
diff --git a/packages/commons/src/lib/notes.ts b/packages/commons/src/lib/notes.tsindex aa2cb84110..9438f529cd 100644--- a/packages/commons/src/lib/notes.ts+++ b/packages/commons/src/lib/notes.ts@@ -71,9 +71,10 @@ export function parseMindMapNoteLink(link: unknown): { notePath: string; noteId:}const notePath = link.slice(1);+ const segments = notePath.split("/");return {notePath,- noteId: notePath.split("/").at(-1) ?? notePath+ noteId: segments[segments.length - 1]};}