Error when using component in collection loop
See original GitHub issueI get an error when I use a component within a loop of a collection. The same components works fine outside the loop.
Index.html
<main>
{% bookshop "hero/base" title: 'My title' %}
<section class="index-sloepen">
{% for item in collections.sloepen %}
{% bookshop "hero/base" title: 'My title' %}
{% endfor %}
</section>
</main>
Console output:
`RenderError` was thrown
> Converting circular structure to JSON
--> starting at object with constructor 'EleventyExtensionMap'
| property '_engineManager' -> object with constructor 'TemplateEngineManager'
| property 'engineCache' -> object with constructor 'Object'
| property 'html' -> object with constructor 'Html'
--- property '_extensionMap' closes the circle
I simplified it for this post, but eventually I want to pass data from my collection items to the component and render a component for each item in the collection.
I tried using a component in a frontmatter forloop, which works fine. When I loop over a collection it breaks.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9
Top Results From Across the Web
VueJS: Error when looping through data array with component
you have not defined posts in your #special-posts-container Vue object. you are passing a variable to another component without declaring it ...
Read more >"Loop must iterate over a collection type" Error
I am getting the error "Loop must iterate over a collection type: SOBJECT: ROI__c" coming from the second loop in the excerpt below....
Read more >Infinite loop when error is thrown in render method. #8653
There is an infinite loop when there are components with error on render and with onMount callback, which calls update of parent component....
Read more >Overview of Loop components in Teams - Microsoft Learn
These are just a few scenarios made easier with Loop components. ... are available for search and collection in both eDiscovery (Standard) ...
Read more >TypeScript For Loops - TutorialsTeacher
The for...of loop returns elements from a collection e.g. array, list or tuple, and so, there is no need to use the traditional...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
All works fine! Much love ❤️
Darn. I’ll have another dig, that trace gives me a good idea of where it’s happening, thanks 🙏