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 not updating attribute if not needed
zadam674172f0b812
diff --git a/src/routes/api/attributes.js b/src/routes/api/attributes.jsindex 660ef2be43..fbed52df0c 100644--- a/src/routes/api/attributes.js+++ b/src/routes/api/attributes.js@@ -125,11 +125,13 @@ function updateNoteAttributes(req) {for (const incAttr of incomingAttributes) {position += 10;+ const value = incAttr.value || "";+const perfectMatchAttr = existingAttrs.find(attr =>attr.type === incAttr.type &&attr.name === incAttr.name &&attr.isInheritable === incAttr.isInheritable &&- attr.value === incAttr.value);+ attr.value === value);if (perfectMatchAttr) {existingAttrs = existingAttrs.filter(attr => attr.attributeId !== perfectMatchAttr.attributeId);