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
client: refactor
Adorian Doran32f7ae1edd65
diff --git a/apps/client/src/widgets/note_wrapper.ts b/apps/client/src/widgets/note_wrapper.tsindex 9eaed96c77..2b8959d113 100644--- a/apps/client/src/widgets/note_wrapper.ts+++ b/apps/client/src/widgets/note_wrapper.ts@@ -90,11 +90,11 @@ export default class NoteWrapperWidget extends FlexContainer<BasicWidget> {async entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) {// listening on changes of note.type and CSS class-+ const LABELS_CAUSING_REFRESH = ["cssClass", "language", "viewType", "color"];const noteId = this.noteContext?.noteId;if (loadResults.isNoteReloaded(noteId) ||- loadResults.getAttributeRows().find((attr) => attr.type === "label" && ["cssClass", "language", "viewType", "color"].includes(attr.name ?? "") && attributeService.isAffecting(attr, this.noteContext?.note))+ loadResults.getAttributeRows().find((attr) => attr.type === "label" && LABELS_CAUSING_REFRESH.includes(attr.name ?? "") && attributeService.isAffecting(attr, this.noteContext?.note))) {this.refresh();}