mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
backport fix from master to avoid doubled attributes inherited from multiple paths
This commit is contained in:
parent
f740e52ebf
commit
6ba3e5ab7f
@ -334,6 +334,11 @@ class Note extends Entity {
|
||||
// we order by noteId so that attributes from same note stay together. Actual noteId ordering doesn't matter.
|
||||
|
||||
const filteredAttributes = attributes.filter((attr, index) => {
|
||||
// if this exact attribute already appears then don't include it (can happen via cloning)
|
||||
if (attributes.findIndex(it => it.attributeId === attr.attributeId) !== index) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (attr.isDefinition()) {
|
||||
const firstDefinitionIndex = attributes.findIndex(el => el.type === attr.type && el.name === attr.name);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user