From 32f7ae1edd65ec6e3ebdcd5e968586b6330f8a16 Mon Sep 17 00:00:00 2001 From: Adorian Doran Date: Fri, 19 Dec 2025 02:12:00 +0200 Subject: [PATCH] client: refactor --- apps/client/src/widgets/note_wrapper.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); }