diff --git a/framework/core/js/lib/helpers/listItems.js b/framework/core/js/lib/helpers/listItems.js index 9a6724b56..133472d60 100644 --- a/framework/core/js/lib/helpers/listItems.js +++ b/framework/core/js/lib/helpers/listItems.js @@ -23,10 +23,12 @@ function withoutUnnecessarySeparators(items) { * The `listItems` helper wraps a collection of components in
  • tags, * stripping out any unnecessary `Separator` components. * - * @param {Array} items + * @param {*} items * @return {Array} */ export default function listItems(items) { + if (!(items instanceof Array)) items = [items]; + return withoutUnnecessarySeparators(items).map(item => { const isListItem = item.component && item.component.isListItem; const active = item.component && item.component.isActive && item.component.isActive(item.props);