From 4e8600a0ef3bfc6a54f5be106449bc4232a0dbd6 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sun, 17 Mar 2024 06:29:59 -0600 Subject: [PATCH] Maintain existing overlay state when setting hash (#10495) --- web/src/hooks/use-overlay-state.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/hooks/use-overlay-state.tsx b/web/src/hooks/use-overlay-state.tsx index f8479c716..82fd0ee2d 100644 --- a/web/src/hooks/use-overlay-state.tsx +++ b/web/src/hooks/use-overlay-state.tsx @@ -76,7 +76,7 @@ export function useHashState(): [ if (!value) { navigate(location.pathname); } else { - navigate(`${location.pathname}#${value}`); + navigate(`${location.pathname}#${value}`, { state: location.state }); } }, // we know that these deps are correct