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 creating inverse relations
zadam8a455e83f0c9
diff --git a/src/public/app/entities/note_short.js b/src/public/app/entities/note_short.jsindex 448d88959d..18537d7a48 100644--- a/src/public/app/entities/note_short.js+++ b/src/public/app/entities/note_short.js@@ -644,12 +644,9 @@ class NoteShort {}/**- * Clear note's attributes cache to force fresh reload for next attribute request.- * Cache is note instance scoped.+ * @deprecated NOOP*/- invalidateAttributeCache() {- this.__attributeCache = null;- }+ invalidateAttributeCache() {}/*** Get relations which target this notediff --git a/src/services/handlers.js b/src/services/handlers.jsindex d1c03bbce1..75caaaa52b 100644--- a/src/services/handlers.js+++ b/src/services/handlers.js@@ -137,8 +137,6 @@ eventService.subscribe(eventService.ENTITY_CHANGED, ({ entityName, entity }) =>value: note.noteId,isInheritable: entity.isInheritable}).save();-- targetNote.invalidateAttributeCache();}});});@@ -150,9 +148,6 @@ eventService.subscribe(eventService.ENTITY_DELETED, ({ entityName, entity }) =>for (const relation of relations) {if (relation.value === note.noteId) {- note.invalidateAttributeCache();- targetNote.invalidateAttributeCache();-relation.markAsDeleted();}}