diff --git a/packages/netlify-cms-core/src/components/Editor/EditorControlPane/Widget.js b/packages/netlify-cms-core/src/components/Editor/EditorControlPane/Widget.js index e7963e98..c05de96d 100644 --- a/packages/netlify-cms-core/src/components/Editor/EditorControlPane/Widget.js +++ b/packages/netlify-cms-core/src/components/Editor/EditorControlPane/Widget.js @@ -194,7 +194,10 @@ export default class Widget extends Component { */ onChangeObject = (fieldName, newValue, newMetadata) => { const newObjectValue = this.getObjectValue().set(fieldName, newValue); - return this.props.onChange(newObjectValue, { [this.props.field.get('name')]: newMetadata }); + return this.props.onChange( + newObjectValue, + newMetadata && { [this.props.field.get('name')]: newMetadata }, + ); }; render() {