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
fix(attributes): attribute detail not showing up for first item (closes #6948)
Elian Dorancd9b46e1c7c4
diff --git a/apps/client/src/widgets/ribbon/components/AttributeEditor.tsx b/apps/client/src/widgets/ribbon/components/AttributeEditor.tsxindex 18c4a3b93a..edae4f014f 100644--- a/apps/client/src/widgets/ribbon/components/AttributeEditor.tsx+++ b/apps/client/src/widgets/ribbon/components/AttributeEditor.tsx@@ -337,7 +337,8 @@ export default function AttributeEditor({ api, note, componentId, notePath, ntxIlet matchedAttr: Attribute | null = null;for (const attr of parsedAttrs) {- if (attr.startIndex && clickIndex > attr.startIndex && attr.endIndex && clickIndex <= attr.endIndex) {+ if (attr.startIndex !== undefined && clickIndex > attr.startIndex &&+ attr.endIndex !== undefined && clickIndex <= attr.endIndex) {matchedAttr = attr;break;}