Skip to content

Build your personal knowledge base with Trilium Notes

fix(widget): remove redundant note context update in useLegacyWidget

lzinga9879d07becd6
diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsx
index f0019ac467..6c5b310612 100644
--- a/apps/client/src/widgets/react/hooks.tsx
+++ b/apps/client/src/widgets/react/hooks.tsx
@@ -677,7 +677,6 @@ export function useLegacyWidget<T extends BasicWidget>(widgetFactory: () => T, {
// The event system may have already updated the widget, in which case
// widget.noteContext will already equal noteContext.
if (widget.noteContext !== noteContext) {
- widget.setNoteContextEvent({ noteContext });
widget.activeContextChangedEvent({ noteContext });
}
}