better detection of changes in attributes and how they affect notes

This commit is contained in:
zadam
2020-06-09 22:59:22 +02:00
parent 1db892d22f
commit 212b719ee9
5 changed files with 86 additions and 13 deletions

View File

@@ -54,6 +54,10 @@ class TreeCache {
if (attr.type === 'relation' && attr.name === 'template' && !(attr.value in existingNotes) && !noteIds.has(attr.value)) {
missingNoteIds.push(attr.value);
}
if (!(attr.noteId in existingNotes) && !noteIds.has(attr.noteId)) {
missingNoteIds.push(attr.noteId);
}
}
if (missingNoteIds.length > 0) {
@@ -283,4 +287,4 @@ class TreeCache {
const treeCache = new TreeCache();
export default treeCache;
export default treeCache;