Help articles

Structure: Invalid list item

A Structure tool list takes an array of list items to display. The Studio reports List items must be of type "listItem", got "<type>", and when the value it received was itself an array it appends - did you forget to spread (...moreItems)?. Common causes:

  • Passing a promise or an observable instead of an actual list item. If you actually need to resolve a list item asynchronously, resolve the items before you resolve the list definition.
  • You passed an array of items within the list. For instance, you might have called the documentTypeListItems() method, but did not use the spread operator to flatten the returned items into the array: ...documentTypeListItems()

Was this page helpful?