fix dropdown menu again

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-08-17 23:15:09 +02:00
parent d722732f63
commit a2ae6cce57

View file

@ -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;
}