diff --git a/frontend/app/components/comment-form/comment-form.tsx b/frontend/app/components/comment-form/comment-form.tsx index a3738e41..1d0c16a8 100644 --- a/frontend/app/components/comment-form/comment-form.tsx +++ b/frontend/app/components/comment-form/comment-form.tsx @@ -140,6 +140,12 @@ export class CommentForm extends Component { this.setState({ text: nextProps.value || '' }); this.props.autofocus && this.textAreaRef.current && this.textAreaRef.current.focus(); } + if (nextProps.user && !this.props.value) { + this.setState({ + isErrorShown: false, + errorMessage: null, + }); + } } shouldComponentUpdate(nextProps: Props, nextState: State) {