1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +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

@ -205,16 +205,15 @@ let Form = React.createClass({
},
getButtons() {
if (this.state.submitted){
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 = (
if (this.state.edited && !this.props.disabled) {
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() {