From 28e3faadee91357351ceca1e6c5f69dd0fec2ca2 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 17 Dec 2024 19:38:18 -0800 Subject: [PATCH] Fix potential bad destructure (undefined) --- src/view/shell/desktop/RightNav.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/view/shell/desktop/RightNav.tsx b/src/view/shell/desktop/RightNav.tsx index f9f1805270..363294aa51 100644 --- a/src/view/shell/desktop/RightNav.tsx +++ b/src/view/shell/desktop/RightNav.tsx @@ -42,7 +42,8 @@ export function DesktopRightNav({routeName}: {routeName: string}) { const kawaii = useKawaiiMode() const gutters = useGutters(['base', 0, 'base', 'wide']) const isSearchScreen = routeName === 'Search' - const {q: searchQuery} = useWebQueryParams() + const webqueryParams = useWebQueryParams() + const searchQuery = webqueryParams?.q const showTrending = !isSearchScreen || (isSearchScreen && !!searchQuery) const {isTablet} = useWebMediaQueries()