From cd32f530d60251f82885f1575d569b5bec052e63 Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Thu, 7 Dec 2023 20:10:21 +1100 Subject: [PATCH] Only handle idle history events (#1872) only handle idle history events --- apps/desktop/src/App.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsx index eeeec2f3d..12248322c 100644 --- a/apps/desktop/src/App.tsx +++ b/apps/desktop/src/App.tsx @@ -95,6 +95,9 @@ function AppInner() { const router = createMemoryRouterWithHistory({ routes, history }); const dispose = router.subscribe((event) => { + // we don't care about non-idle events as those are artifacts of form mutations + suspense + if (event.navigation.state !== 'idle') return; + setTabs((routers) => { const index = routers.findIndex((r) => r.router === router); if (index === -1) return routers;