From fce2434dcdef126a3ab180447e7cb48bc24ec1f9 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Tue, 30 Apr 2019 09:15:58 +0900 Subject: Specify default props --- src/settings/components/form/KeymapsForm.jsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/settings/components/form/KeymapsForm.jsx') diff --git a/src/settings/components/form/KeymapsForm.jsx b/src/settings/components/form/KeymapsForm.jsx index 26a22d7..5bb65cb 100644 --- a/src/settings/components/form/KeymapsForm.jsx +++ b/src/settings/components/form/KeymapsForm.jsx @@ -30,10 +30,6 @@ class KeymapsForm extends React.Component { } bindValue(e) { - if (!this.props.onChange) { - return; - } - let next = { ...this.props.value }; next[e.target.name] = e.target.value; @@ -48,6 +44,7 @@ KeymapsForm.propTypes = { KeymapsForm.defaultProps = { value: {}, + onChange: () => {}, }; export default KeymapsForm; -- cgit v1.2.3