1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

Use null to denote an empty React element instead of {}

This commit is contained in:
Brett Sun 2015-12-10 18:04:46 +01:00
parent 34153c2322
commit e96e7ffa2b
2 changed files with 6 additions and 6 deletions

View File

@ -208,7 +208,7 @@ let Form = React.createClass({
if (this.state.submitted){ if (this.state.submitted){
return this.props.spinner; return this.props.spinner;
} }
if (this.props.buttons){ if ('buttons' in this.props) {
return this.props.buttons; return this.props.buttons;
} }
let buttons = null; let buttons = null;

View File

@ -183,7 +183,7 @@ const PRRegisterPieceForm = React.createClass({
return ( return (
<div className="register-piece--form"> <div className="register-piece--form">
<Form <Form
buttons={{}} buttons={null}
className="ascribe-form-bordered" className="ascribe-form-bordered"
ref="registerPieceForm"> ref="registerPieceForm">
<Property <Property
@ -220,7 +220,7 @@ const PRRegisterPieceForm = React.createClass({
</Property> </Property>
</Form> </Form>
<Form <Form
buttons={{}} buttons={null}
className="ascribe-form-bordered" className="ascribe-form-bordered"
ref="additionalDataForm"> ref="additionalDataForm">
<Property <Property
@ -246,7 +246,7 @@ const PRRegisterPieceForm = React.createClass({
</Property> </Property>
</Form> </Form>
<Form <Form
buttons={{}} buttons={null}
className="ascribe-form-bordered" className="ascribe-form-bordered"
ref="uploadersForm"> ref="uploadersForm">
<Property <Property
@ -349,7 +349,7 @@ const PRRegisterPieceForm = React.createClass({
</Property> </Property>
</Form> </Form>
<Form <Form
buttons={{}} buttons={null}
className="ascribe-form-bordered"> className="ascribe-form-bordered">
<Property <Property
name="terms" name="terms"
@ -372,4 +372,4 @@ const PRRegisterPieceForm = React.createClass({
} }
}); });
export default PRRegisterPieceForm; export default PRRegisterPieceForm;