fix(SW-2690): Added check if link element has href tag before rendering Link component

Approved-by: Michael Zetterberg
Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-05-09 12:20:49 +00:00
parent ae657c2b49
commit de86e46c0b

View File

@@ -95,7 +95,9 @@ function renderNode(domNode: Node, idx: number) {
return <br key={domNode.name + idx} />
case NodeNames.a:
console.log(domNode.attribs.target)
if (!domNode.attribs.href) {
return null
}
return (
<Link
key={domNode.name + idx}