diff --git a/apps/client/src/widgets/note_wrapper.ts b/apps/client/src/widgets/note_wrapper.ts index 9eaed96c7..2b8959d11 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 { 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(); }