From 2689b22674b1c5d17b09c97461228f5572180242 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 30 Aug 2025 19:33:32 +0300 Subject: [PATCH] chore(react): not reacting to deleted note labels --- apps/client/src/widgets/react/hooks.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsx index 4a9f24ceb..6b1d7af68 100644 --- a/apps/client/src/widgets/react/hooks.tsx +++ b/apps/client/src/widgets/react/hooks.tsx @@ -300,7 +300,11 @@ export function useNoteLabel(note: FNote | undefined | null, labelName: string): useTriliumEvent("entitiesReloaded", ({ loadResults }) => { for (const attr of loadResults.getAttributeRows()) { if (attr.type === "label" && attr.name === labelName && attributes.isAffecting(attr, note)) { - setLabelValue(attr.value ?? null); + if (!attr.isDeleted) { + setLabelValue(attr.value); + } else { + setLabelValue(null); + } } } });