Skip to content

Commit 962c81d

Browse files
committed
refactor(AddCommentFormView): simplify the component usage by making validationErrors and l10n optional
1 parent 4f23cea commit 962c81d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/frontend/src/components/AddCommentForm.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class AddCommentForm extends React.PureComponent {
8989

9090
class AddCommentFormView extends React.PureComponent {
9191
render() {
92-
const {handleSubmit, hasServerError, handleChange, validationErrors, isDisabled, l10n} = this.props;
92+
const {handleSubmit, hasServerError, handleChange, validationErrors = [], isDisabled, l10n = {}} = this.props;
9393
const hasValidationErrors = validationErrors.length > 0;
9494
return (
9595
<div className="col-sm-12 form-group">

0 commit comments

Comments
 (0)