Replies: 1 comment 2 replies
-
I'm not quite sure if I understand the issue but I want to point out that |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have code where an x-if wraps an x-for to stop the x-for from running if the variables are not correct. In v2 this code worked correctly, in v3 the x-for throws an error:
can't access property "length", items is undefined
even though the x-if should be stopping it beforehand.I've tried a few different ways of writing the if statement, but nothing seems to make a difference
The code looks like:
You can see a working example at the codepen below. Click 5 or 7 and then null or clear. It breaks when it should not. 5 to 7 works fine
https://codepen.io/acxz/pen/mdmeJRo?editors=1010
It was already suggested to me to add a
|| []
at the end of the for to account for the collection being undefined, but that shouldn't be necessary. This situation should not be occurring like thisBeta Was this translation helpful? Give feedback.
All reactions