fix list item deletion

This commit is contained in:
Shawn Erquhart 2017-04-20 11:47:40 -04:00
parent b64dfab42e
commit d250b1cef3

View File

@ -102,7 +102,7 @@ export default class ListControl extends Component {
return (e) => {
e.preventDefault();
const { value, metadata, onChange, forID } = this.props;
const parsedMetadata = { [forID]: metadata.removeIn(value.get(index).valueSeq()) };
const parsedMetadata = metadata && { [forID]: metadata.removeIn(value.get(index).valueSeq()) };
onChange(value.remove(index), parsedMetadata);
};
}