diff --git a/frontend/src/component/context/form-context-component.jsx b/frontend/src/component/context/form-context-component.jsx index a0b858e72f..43249c32c9 100644 --- a/frontend/src/component/context/form-context-component.jsx +++ b/frontend/src/component/context/form-context-component.jsx @@ -19,6 +19,8 @@ class AddContextComponent extends Component { static getDerivedStateFromProps(props, state) { if (!state.contextField.name && props.contextField.name) { return { contextField: props.contextField }; + } else { + return null; } } @@ -162,7 +164,6 @@ class AddContextComponent extends Component { AddContextComponent.propTypes = { contextField: PropTypes.object.isRequired, validateName: PropTypes.func.isRequired, - fetchContext: PropTypes.func.isRequired, submit: PropTypes.func.isRequired, history: PropTypes.object.isRequired, editMode: PropTypes.bool.isRequired,