@thebuilder and @fbosch , when using the in Diversa, I've noticed that the value of the href attributes related to the a tags we receive inside of the Richtext elements is coming as "undefined". Therefore, the anchor tag is added to the HTML but the href isn't (see image below).
When debugging the UmbracoRichText component, I've noticed that it is happening because of the assignment done in the part of the code linked above. It seems like in the content we receive from Umbraco, the path attribute is never present. So, I suggest that we either remove this passage of the code OR we add a check as below.
if(element.tag === "a" && route?.path) {
attributes.href = route?.path;
}
https://github.com/charlie-tango/react-umbraco/blob/e087ecf6b9ca17d1f43674c9b25ba806a5b3f567/src/UmbracoRichText.tsx#L211
@thebuilder and @fbosch , when using the in Diversa, I've noticed that the value of the
href
attributes related to thea
tags we receive inside of the Richtext elements is coming as "undefined". Therefore, the anchor tag is added to the HTML but thehref
isn't (see image below).When debugging the
UmbracoRichText
component, I've noticed that it is happening because of the assignment done in the part of the code linked above. It seems like in the content we receive from Umbraco, thepath
attribute is never present. So, I suggest that we either remove this passage of the code OR we add a check as below.