From 2a521ad8f82160b83f2d400c5a75f41bcb61f6d1 Mon Sep 17 00:00:00 2001 From: plebeius Date: Fri, 7 Nov 2025 18:46:12 +0100 Subject: [PATCH] fix(board buttons): guard against undefined address --- src/components/board-buttons/board-buttons.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/board-buttons/board-buttons.tsx b/src/components/board-buttons/board-buttons.tsx index 2a5e3da8..fd0e92d2 100644 --- a/src/components/board-buttons/board-buttons.tsx +++ b/src/components/board-buttons/board-buttons.tsx @@ -45,7 +45,7 @@ const CatalogButton = ({ address, isInAllView, isInSubscriptionsView, isInModVie if (params?.timeFilterName) return `/mod/catalog/${params.timeFilterName}`; return `/mod/catalog`; } - const boardPath = address ? getBoardPath(address, defaultSubplebbits) : address; + const boardPath = address ? getBoardPath(address, defaultSubplebbits) : defaultSubplebbits || ''; return `/${boardPath}/catalog`; }; @@ -83,7 +83,7 @@ const ReturnButton = ({ address, isInAllView, isInSubscriptionsView, isInModView if (params?.timeFilterName) return `/mod/${params.timeFilterName}`; return `/mod`; } - const boardPath = address ? getBoardPath(address, defaultSubplebbits) : address; + const boardPath = address ? getBoardPath(address, defaultSubplebbits) : defaultSubplebbits || ''; return `/${boardPath}`; };