T.elected.boundaries is not a function

I use RESTful API to get data. After that I use PrismicDOM.RichText.asHtml to render webView content and the result as the image below:

Here is the response data:

{ page: 1, results_per_page: 20, results_size: 1, total_results_size: 1, total_pages: 1, next_page: null, prev_page: null, results: [ { id: 'xxx', uid: null, type: 'xxx', href: 'xxx', tags: [], first_publication_date: 'xxx', last_publication_date: 'xxx', slugs: ['xxx'], linked_documents: [], lang: 'fr-fr', alternate_languages: [], data: { type: 'xxx', published_date: 'xxx', version: 1, conditions: [ { type: 'heading2', text: 'ssss', spans: [] }, { type: 'paragraph', text: '', spans: [] }, { type: 'heading2', text: 'Heading 2', spans: [] }, { type: 'paragraph', text: '', spans: [] }, { type: 'heading3', text: 'Heading 3', spans: [] }, { type: 'paragraph', text: '', spans: [] }, { type: 'paragraph', text: 'Yeah', spans: [ { start: 0, end: 4, type: 'strong' } ] }, { type: 'paragraph', text: '', spans: [] }, { type: 'list-item', text: 'xx', spans: [] }, { type: 'list-item', text: 'x', spans: [] }, { type: 'list-item', text: 'x', spans: [] }, { type: 'list-item', text: 'x', spans: [] } ], changelog: [ { type: 'paragraph', text: 'CHG', spans: [] } ] } } ] }

My code is:

Screen Shot 2021-06-10 at 18.04.10

Hi Nam,

Welcome to the Prismic community.
I have investigated a bit this issue, and it doesn't seem that the "conditions" field you are passing is a valid structure text field!

Here is an example of a StructuredText field pulled from the REST API V2.
Screenshot 2021-06-23 at 17.29.09

Can you share with us the name of the repository you are using (in a private message if necessary) in inorder to debug the issue?

And also, can you tell us what is the endpoint you are calling.

1 Like

Hi Fares, thanks for your help, I think I have found the problem, it's come from I set "Immutable" for value, so it's caused an error like this.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.