From 7f30680fb304184a7cb36a525d59930491b7c9a2 Mon Sep 17 00:00:00 2001 From: Matiss Janis Aboltins Date: Tue, 2 Jul 2024 21:23:33 +0100 Subject: [PATCH] Revert ":bug: fix the app randomly navigating back (closing) (#2772)" (#2966) This reverts commit 247e3e8d93c3eeb4cac4585958e1770cc8f63503. --- packages/desktop-client/src/hooks/useNavigate.ts | 3 +++ upcoming-release-notes/2772.md | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 upcoming-release-notes/2772.md diff --git a/packages/desktop-client/src/hooks/useNavigate.ts b/packages/desktop-client/src/hooks/useNavigate.ts index 4361ebc022a..5f05bb2b1e6 100644 --- a/packages/desktop-client/src/hooks/useNavigate.ts +++ b/packages/desktop-client/src/hooks/useNavigate.ts @@ -36,6 +36,9 @@ export function useNavigate(): NavigateFunction { JSON.stringify(previousOriginalState) ) { navigate(to, optionsWithPrevLocation); + } else { + // `to` is the same as the previous location. Just go back. + navigate(-1); } } }, diff --git a/upcoming-release-notes/2772.md b/upcoming-release-notes/2772.md deleted file mode 100644 index 4982b5a0f13..00000000000 --- a/upcoming-release-notes/2772.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [MatissJanis] ---- - -Fix the app randomly closing