FaridSafi / react-native-gifted-form

📝 « One React-Native form component to rule them all »
MIT License
1.44k stars 214 forks source link

Fix GiftedForm child is null error. #20

Closed cnjon closed 8 years ago

cnjon commented 8 years ago
...
    <GiftedForm.SeparatorWidget />
                {this.state.isShowSwitch && (
                    <GiftedForm.SwitchWidget
                        name="test"
                        title="test"
                        image={<IconIon  name="lightbulb" />}
                    />
                )}
                <GiftedForm.SeparatorWidget />
...

If this.state.isShowSwitch is false,will throw an exception!

FaridSafi commented 8 years ago

Thank you @cnjon