fix(board buttons): guard against undefined address

This commit is contained in:
plebeius
2025-11-07 18:46:12 +01:00
parent 43956d44a1
commit 2a521ad8f8
@@ -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}`;
};