aboutsummaryrefslogtreecommitdiff
path: root/src/settings/components/form/SearchForm.jsx
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-04-30 09:03:01 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-04-30 09:03:01 +0900
commit808344eecfedd04149551867724e46a7988c45a0 (patch)
tree523281c76405696f7ad0008887691baa09973735 /src/settings/components/form/SearchForm.jsx
parent4bac47249be20aff630fbecfe66fe021068a3095 (diff)
Fix React Component tests
Diffstat (limited to 'src/settings/components/form/SearchForm.jsx')
-rw-r--r--src/settings/components/form/SearchForm.jsx6
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;