value can be undefined as long as there is an entry

This commit is contained in:
Cássio Zen 2016-10-19 18:29:54 -02:00
parent 1cbf6736a2
commit 23ab740d53

View File

@ -10,7 +10,8 @@ export default class ControlPane extends Component {
const widget = resolveWidget(field.get('widget'));
const fieldName = field.get('name');
const value = entry.getIn(['data', fieldName]);
if (!value) return null;
if (entry.size === 0) return null;
return (
<div className={styles.control}>
<label className={styles.label} htmlFor={fieldName}>{field.get('label')}</label>