From a2ae6cce574f88ba33562921a0ea8ebe56ad45bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 17 Aug 2024 23:15:09 +0200 Subject: [PATCH] fix dropdown menu again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/components/dropdown-menu/dropdown-menu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/dropdown-menu/dropdown-menu.tsx b/src/components/dropdown-menu/dropdown-menu.tsx index 147aa00f2c..bb0d391ebe 100644 --- a/src/components/dropdown-menu/dropdown-menu.tsx +++ b/src/components/dropdown-menu/dropdown-menu.tsx @@ -109,7 +109,7 @@ const DropdownMenu = (props: IDropdownMenu) => { unlistenHistory.current = undefined; } const { state } = history.location; - if (goBack && (state as any).soapboxDropdownKey && (state as any).soapboxDropdownKey === dropdownHistoryKey.current) { + if (goBack && state && (state as any).soapboxDropdownKey && (state as any).soapboxDropdownKey === dropdownHistoryKey.current) { history.goBack(); (history.location.state as any).soapboxDropdownKey = true; }