diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-04-30 09:03:01 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-04-30 09:03:01 +0900 |
commit | 808344eecfedd04149551867724e46a7988c45a0 (patch) | |
tree | 523281c76405696f7ad0008887691baa09973735 /src/settings/components/form/SearchForm.jsx | |
parent | 4bac47249be20aff630fbecfe66fe021068a3095 (diff) |
Fix React Component tests
Diffstat (limited to 'src/settings/components/form/SearchForm.jsx')
-rw-r--r-- | src/settings/components/form/SearchForm.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/settings/components/form/SearchForm.jsx b/src/settings/components/form/SearchForm.jsx index 718cca1..2e070fc 100644 --- a/src/settings/components/form/SearchForm.jsx +++ b/src/settings/components/form/SearchForm.jsx @@ -8,9 +8,6 @@ class SearchForm extends React.Component { render() { let value = this.props.value; - if (!value) { - value = { default: '', engines: []}; - } if (!value.engines) { value.engines = []; } @@ -82,7 +79,10 @@ SearchForm.propTypes = { engines: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.string)), }), onChange: PropTypes.func, +}; +SearchForm.defaultProps = { + value: { default: '', engines: []}, }; export default SearchForm; |