You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, that's a great lib, thank you all for your hard work on this!
When we try to access an specific condition in an empty array, we get index out of range.
How can we check if the array is not empty before accessing their items?
In the example above, even forcing the false in the if condition, it's still evaluating the true part, causing the index out of range.
Shouldn't return the "else" value , even returning the error?
This is what the JSON Logic playground returns:
Is there any other way to get the value of a property from an array's item (like categories from the first position in my example)?
Thank you
The text was updated successfully, but these errors were encountered:
First of all, that's a great lib, thank you all for your hard work on this!
When we try to access an specific condition in an empty array, we get index out of range.
How can we check if the array is not empty before accessing their items?
Quick playground example
In the example above, even forcing the false in the
if
condition, it's still evaluating the true part, causing the index out of range.Shouldn't return the
"else"
value , even returning the error?This is what the JSON Logic playground returns:
Is there any other way to get the value of a property from an array's item (like
categories
from the first position in my example)?Thank you
The text was updated successfully, but these errors were encountered: