-
Notifications
You must be signed in to change notification settings - Fork 16
t.reduce() is not a function #29
Comments
Any news about this? I also get this error in my vue project. |
Happens to me as well. |
Hi! It looks like the issue is that you're probably using the V1 API instead of the V2. |
Any update on this? I'm also seeing this error. I'm positive my results are V2 API results. |
Hey everyone, sorry for the delayed response. We actually have a Vue.js plugin here that is meant to be used instead of this library: I suggest using this for your Vue projects to render your Rich Text fields. |
What if we're not using Vue? |
If you're not using Vue can you submit this issue via the chat support on the prismic.io website or from your Prismic repository? |
I am experiencing the same problem using vue. It seams to occur when I want to use Prismic rich text outside of the router view (in my navbar and footer). |
This error occurred for me when i had a rich text field with only list items, and instead of passing the full array of list items into |
Hello. I am getting this error on the v2 api using the primsic-vue plugin ( |
I am having the same issue and submitted an issue as well. Please fix. |
I'm getting the same error when using Vue with the Composition Api. EDIT: Sorry for bothering you. I figured out that the element I was sending into the Kind regards |
Hey, I'm sorry we failed to give this issue any attention until then. We'll make sure to take that into account as we move forward with this kit. We're currently reworking it to provide first-class TypeScript support and a better interface |
OK, I investigated a bit this issue. I can confirm that API v2 rich text and title fields consistently return an array, even when freshly created and new. With that in mind when you have a Prismic document feature one of those fields it should never be What might happen above is the following scenario:
If you think that's the scenario you're experiencing I'd recommend conditionally rendering that component depending on if Prismic data are there. In the next version of this package, we'll have more failsafe to prevent that behavior. |
Using VueJS
Aside from the fact its uncaught, I am getting this error when pushing a new page or creating a new component that is fetching Prismic data.
Scenario 1
Scenario 2
Should I be using a store or something to only fetch the data once? Why does fetching it again fail?
My code looks like this:
The text was updated successfully, but these errors were encountered: