You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Appease the linter
This checks `onValidate` in `render` to make the linter happy.
This commit is contained in:
@@ -95,10 +95,13 @@ export default class Field extends React.PureComponent {
|
||||
prefixContainer = <span className="mx_Field_prefix">{prefix}</span>;
|
||||
}
|
||||
|
||||
const validClass = classNames({
|
||||
let validClass;
|
||||
if (onValidate) {
|
||||
validClass = classNames({
|
||||
mx_Field_valid: this.state.valid === true,
|
||||
mx_Field_invalid: this.state.valid === false,
|
||||
});
|
||||
}
|
||||
|
||||
const fieldClasses = classNames("mx_Field", `mx_Field_${inputElement}`, {
|
||||
// If we have a prefix element, leave the label always at the top left and
|
||||
|
||||
Reference in New Issue
Block a user