make sure the attribute is not duplicated in TreeCache and NoteCache, #1278

This commit is contained in:
zadam
2020-09-30 22:34:18 +02:00
parent d163289003
commit cba9b92202
5 changed files with 32 additions and 4 deletions

View File

@@ -373,6 +373,7 @@ class Note extends Entity {
return false;
}
// FIXME: this code is quite questionable, one problem is that other caches (TreeCache, NoteCache) have nothing like that
if (attr.isDefinition()) {
const firstDefinitionIndex = attributes.findIndex(el => el.type === attr.type && el.name === attr.name);