Skip to content

Build your personal knowledge base with Trilium Notes

Apply suggestions from code review

Elian Doran149ffe0f47c8
diff --git a/apps/edit-docs/src/help_meta_generator.ts b/apps/edit-docs/src/help_meta_generator.ts
index c6eedf1f05..6e6db8269e 100644
--- a/apps/edit-docs/src/help_meta_generator.ts
+++ b/apps/edit-docs/src/help_meta_generator.ts
@@ -70,6 +70,7 @@ function parseNoteMeta(noteMeta: NoteMeta, handleTextNote: TextNoteHandler, docN
// Build the URL for this note
const shareAlias = noteMeta.attributes?.find((a) => a.type === "label" && a.name === "shareAlias")?.value;
const currentUrl = parentUrl && shareAlias ? `${parentUrl}/${shareAlias}` : parentUrl;
+ const noteUrl = shareAlias ? currentUrl : undefined;
// Handle attributes
for (const attribute of noteMeta.attributes ?? []) {
@@ -94,7 +95,7 @@ function parseNoteMeta(noteMeta: NoteMeta, handleTextNote: TextNoteHandler, docN
// Handle text notes
if (noteMeta.type === "text" && noteMeta.dataFileName) {
const docPath = `${docNameRoot}/${path.basename(noteMeta.dataFileName, ".html")}`.substring(1);
- if (!handleTextNote(item, docPath, currentUrl)) {
+ if (!handleTextNote(item, docPath, noteUrl)) {
return null;
}
}