Fix list items crashing for first fields other than strings.

This commit is contained in:
Caleb 2018-02-17 19:38:02 -07:00 committed by Shawn Erquhart
parent 6946faab7d
commit 684735311c

View File

@ -194,7 +194,7 @@ export default class ListControl extends Component {
const singleField = field.get('field');
const labelField = (multiFields && multiFields.first()) || singleField;
const value = multiFields ? item.get(multiFields.first().get('name')) : singleField.get('label');
return value || `No ${ labelField.get('name') }`;
return (value || `No ${ labelField.get('name') }`).toString();
}
onSortEnd = ({ oldIndex, newIndex }) => {