Closed rokerkony closed 2 years ago
it was problem that I was still fetching the api v1, with v2 it works
Hi @rokerkony, thanks for letting us know you found a fix! Sorry you didn't get a response quickly, but feel free to reach out again if you run into other issues.
Hey, I created a document on Prismic.io and in the rich text field I added link to external website. The result though is rendered with an empty href as follows:
I was investigating more on this topic and found out that this code to serialize the link block is not respecting the block I get from Prismic API (v2).
See the object I get for my RichText:
The method mentioned above works with
element.data.target
instead ofelement.data.value.target
. Same asLinkHelper.url(element.data, linkResolver))
should beLinkHelper.url(element.data.value, linkResolver))
.My thoughts are based on the response I get from the API.
Can you please check it?
p.s.: For transformation of RichText to HTML I use
The element in the custom type is defined as: