AUR0777
Error Message
AUR0777: Unsupported: [repeat] cannot iterate over <value>
Where <value> is the string representation of the non-iterable value provided to repeat.for.
Description
This error occurs when the expression result provided to a repeat.for attribute (the part after of) is not a value that the repeater knows how to iterate over.
Cause
The repeat.for attribute expects the value bound after the of keyword to be one of the following:
An iterable object: Such as an Array,
Map,Set,string, or other object implementing the iterable protocol ([Symbol.iterator])A number: To repeat the template a fixed number of times.
nullorundefined: Which results in the repeater rendering nothing.
This error is thrown by the handleCollectionChange method within the Repeat controller when it receives a value of any other type (e.g., a plain object { }, a boolean true/false, a function, a Symbol) because it cannot determine how to iterate over such values to generate repeated elements.
Solution
Ensure that the value you provide to repeat.for="... of value" is either an Array, Map, Set, string, a number, null, or undefined.
If you have a plain object and want to iterate over its keys or entries, convert it to an iterable first (e.g., using
Object.keys(myObject),Object.values(myObject), orObject.entries(myObject)).If you have a different data type, check your view model logic to ensure the correct variable holding an iterable or number is being bound.
Example
Debugging Tips
Inspect the value bound to the
repeat.forexpression in your view model usingconsole.logor a debugger.Verify the type of the value. Is it an Array, Set, Map, string, or number?
If it's an object, use
Object.keys,Object.values, orObject.entriesin the binding expression to make it iterable.Ensure the correct variable is being used in the
repeat.forbinding.
Last updated
Was this helpful?