diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsx index 10a5983c6..9a3b690eb 100644 --- a/apps/client/src/widgets/react/hooks.tsx +++ b/apps/client/src/widgets/react/hooks.tsx @@ -369,7 +369,8 @@ export function useActiveNoteContext() { useEffect(() => { setNote(noteContext?.note); - }, [ notePath ]); + setNotePath(noteContext?.notePath); + }, [ notePath, noteContext?.note, noteContext?.notePath ]); useTriliumEvents([ "setNoteContext", "activeContextChanged", "noteSwitchedAndActivated", "noteSwitched" ], () => { const noteContext = appContext.tabManager.getActiveContext() ?? undefined;