Only output Link if link has an href (else page blows up)

This commit is contained in:
2024-08-20 10:07:45 -05:00
parent e08e37222b
commit 4230f34b15

View File

@ -90,7 +90,7 @@ export default function BlockElementWrapper({data, metaData, slot, linkProps, ch
let rs = children; let rs = children;
if (link) if (link && link.href)
{ {
rs = <Link to={link.href} target={link.target} style={{color: "#546E7A"}} {...linkProps}>{rs}</Link>; rs = <Link to={link.href} target={link.target} style={{color: "#546E7A"}} {...linkProps}>{rs}</Link>;
} }