diff options
Diffstat (limited to 'src/settings/components/form')
-rw-r--r-- | src/settings/components/form/keymaps-form.jsx | 2 | ||||
-rw-r--r-- | src/settings/components/form/properties-form.jsx | 2 | ||||
-rw-r--r-- | src/settings/components/form/search-form.jsx | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/settings/components/form/keymaps-form.jsx b/src/settings/components/form/keymaps-form.jsx index f0f69cf..dcf65d9 100644 --- a/src/settings/components/form/keymaps-form.jsx +++ b/src/settings/components/form/keymaps-form.jsx @@ -100,7 +100,7 @@ class KeymapsForm extends Component { return; } - let next = Object.assign({}, this.props.value); + let next = { ...this.props.value }; next[e.target.name] = e.target.value; this.props.onChange(next); diff --git a/src/settings/components/form/properties-form.jsx b/src/settings/components/form/properties-form.jsx index 55c8512..ceb79d7 100644 --- a/src/settings/components/form/properties-form.jsx +++ b/src/settings/components/form/properties-form.jsx @@ -44,7 +44,7 @@ class PropertiesForm extends Component { } let name = e.target.name; - let next = Object.assign({}, this.props.value); + let next = { ...this.props.value }; if (e.target.type.toLowerCase() === 'checkbox') { next[name] = e.target.checked; } else if (e.target.type.toLowerCase() === 'number') { diff --git a/src/settings/components/form/search-form.jsx b/src/settings/components/form/search-form.jsx index e85761f..2d5f01b 100644 --- a/src/settings/components/form/search-form.jsx +++ b/src/settings/components/form/search-form.jsx @@ -53,10 +53,10 @@ class SearchForm extends Component { let value = this.props.value; let name = e.target.name; let index = e.target.getAttribute('data-index'); - let next = Object.assign({}, { + let next = { default: value.default, engines: value.engines ? value.engines.slice() : [], - }); + }; if (name === 'name') { next.engines[index][0] = e.target.value; |