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(react/ribbon): attribute editor saving unnecessarily
Elian Doran470edc4d7040
diff --git a/apps/client/src/widgets/ribbon/components/AttributeEditor.tsx b/apps/client/src/widgets/ribbon/components/AttributeEditor.tsxindex 718187b2ee..73a37fb4af 100644--- a/apps/client/src/widgets/ribbon/components/AttributeEditor.tsx+++ b/apps/client/src/widgets/ribbon/components/AttributeEditor.tsx@@ -139,8 +139,8 @@ export default function AttributeEditor({ note, componentId, notePath, ntxId, hiasync function save() {const attributes = parseAttributes();- if (!attributes) {- // An error occurred and will be reported to the user.+ if (!attributes || !needsSaving) {+ // An error occurred and will be reported to the user, or nothing to save.return;}