# T.elected.boundaries is not a function

**URL:** <https://community.prismic.io/t/t-elected-boundaries-is-not-a-function/5734>\
**Category:** Developing with Prismic\
**Tags:** javascript\
**Created:** [June 10, 2021, 11:05am UTC](https://community.prismic.io/t/t-elected-boundaries-is-not-a-function/5734 "2021-06-10T11:05:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hoang-nam.tran](https://avatars.discourse-cdn.com/v4/letter/h/45deac/32.png) [@hoang-nam.tran](https://community.prismic.io/u/hoang-nam.tran)\
**Post date:** [June 10, 2021, 11:05am UTC](https://community.prismic.io/t/t-elected-boundaries-is-not-a-function/5734/1 "2021-06-10T11:05:52Z")

</div>

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:

 ![Screen Shot 2021-06-10 at 17.52.08](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/0/00a9fff0fbe9c92f76a60438387a6aa53cc4a8e2.png)

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](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/2/218203d4e07cdafd27a3e1766c70821e7315657f.png)

---

<div class="post-metadata">

**Author:** ![Fares](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Fares](https://community.prismic.io/u/Fares)\
**Post date:** [June 23, 2021, 3:35pm UTC](https://community.prismic.io/t/t-elected-boundaries-is-not-a-function/5734/3 "2021-06-23T15:35:14Z")

</div>

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](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/b/bd5fda592c430068a804806930b72723166e4a4b.png)

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.

---

<div class="post-metadata">

**Author:** ![hoang-nam.tran](https://avatars.discourse-cdn.com/v4/letter/h/45deac/32.png) [@hoang-nam.tran](https://community.prismic.io/u/hoang-nam.tran)\
**Post date:** [June 25, 2021, 5:26am UTC](https://community.prismic.io/t/t-elected-boundaries-is-not-a-function/5734/4 "2021-06-25T05:26:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [June 28, 2021, 3:15pm UTC](https://community.prismic.io/t/t-elected-boundaries-is-not-a-function/5734/5 "2021-06-28T15:15:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 3:40pm UTC](https://community.prismic.io/t/t-elected-boundaries-is-not-a-function/5734/6 "2021-12-09T15:40:02Z")

</div>


