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/BlacklistForm.jsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/settings/components/form/BlacklistForm.jsx') diff --git a/src/settings/components/form/BlacklistForm.jsx b/src/settings/components/form/BlacklistForm.jsx index cee04bd..cf7cffe 100644 --- a/src/settings/components/form/BlacklistForm.jsx +++ b/src/settings/components/form/BlacklistForm.jsx @@ -25,10 +25,6 @@ class BlacklistForm extends React.Component { } bindValue(e) { - if (!this.props.onChange) { - return; - } - let name = e.target.name; let index = e.target.getAttribute('data-index'); let next = this.props.value ? this.props.value.slice() : []; @@ -52,6 +48,7 @@ BlacklistForm.propTypes = { BlacklistForm.defaultProps = { value: [], + onChange: () => {}, }; export default BlacklistForm; -- cgit v1.2.3