0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-26 13:52:38 +00:00

Add guard clause to prevent empty nav lines

This commit is contained in:
G.Ambatte
2025-01-09 08:07:59 +13:00
parent 914521cada
commit 9c2610ff40

View File

@@ -71,6 +71,8 @@ const HeaderNavItem = ({ link, text, depth, className })=>{
return output;
};
if(!link || !text) return;
return <li>
<a href={`#${link}`} target='_self' className={`depth-${depth} ${className ?? ''}`}>
{trimString(text, depth)}