From 78fd39a0fbb4797ae90ab9de02f6f9ffe5a16370 Mon Sep 17 00:00:00 2001 From: Hemachandar <132386067+hmacr@users.noreply.github.com> Date: Tue, 16 Jul 2024 06:23:33 +0530 Subject: [PATCH] fix: unset active collection id when navigating away from a document (#7241) --- app/stores/UiStore.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/stores/UiStore.ts b/app/stores/UiStore.ts index 29b407603d..84c59675a0 100644 --- a/app/stores/UiStore.ts +++ b/app/stores/UiStore.ts @@ -193,6 +193,10 @@ class UiStore { clearActiveDocument = (): void => { this.activeDocumentId = undefined; this.observingUserId = undefined; + + // Unset when navigating away from a document (e.g. to another document, home, settings, etc.) + // Next document's onMount will set the right activeCollectionId. + this.activeCollectionId = undefined; }; @action