1
0
mirror of https://github.com/ascribe/onion.git synced 2025-02-14 21:10:27 +01:00

Fix mistaken check for form buttons

This commit is contained in:
Brett Sun 2016-01-20 12:32:49 +01:00
parent 405a46dca3
commit a85c70798e

View File

@ -208,13 +208,12 @@ let Form = React.createClass({
if (this.state.submitted) {
return this.props.spinner;
}
if ('buttons' in this.props) {
if (this.props.buttons !== undefined) {
return this.props.buttons;
}
let buttons = null;
if (this.state.edited && !this.props.disabled) {
buttons = (
return (
<div className="row" style={{margin: 0}}>
<p className="pull-right">
<Button
@ -230,9 +229,9 @@ let Form = React.createClass({
</p>
</div>
);
} else {
return null;
}
return buttons;
},
getErrors() {