From 7dab243c81b9b5c7bee93b8502d6f395ff5108de Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Wed, 16 Mar 2022 22:57:49 +0300 Subject: [PATCH] rm unnecessary checks --- src/components/CheckboxWithLabel.js | 8 +++----- src/components/Picker/index.js | 8 +++----- src/components/RadioButtonWithLabel.js | 8 +++----- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/components/CheckboxWithLabel.js b/src/components/CheckboxWithLabel.js index efa074e05c4c..f494895af102 100644 --- a/src/components/CheckboxWithLabel.js +++ b/src/components/CheckboxWithLabel.js @@ -102,11 +102,9 @@ const CheckboxWithLabel = React.forwardRef((props, ref) => { {LabelComponent && ()} - {!_.isEmpty(props.errorText) && ( - - {props.errorText} - - )} + + {props.errorText} + ); }); diff --git a/src/components/Picker/index.js b/src/components/Picker/index.js index f7a00dd71bc7..b7277fcda73e 100644 --- a/src/components/Picker/index.js +++ b/src/components/Picker/index.js @@ -63,11 +63,9 @@ class Picker extends PureComponent { {...pickerProps} /> - {!_.isEmpty(this.props.errorText) && ( - - {this.props.errorText} - - )} + + {this.props.errorText} + ); } diff --git a/src/components/RadioButtonWithLabel.js b/src/components/RadioButtonWithLabel.js index f958adb750b4..630981970c2c 100644 --- a/src/components/RadioButtonWithLabel.js +++ b/src/components/RadioButtonWithLabel.js @@ -75,11 +75,9 @@ const RadioButtonWithLabel = (props) => { {LabelComponent && ()} - {!_.isEmpty(props.errorText) && ( - - {props.errorText} - - )} + + {props.errorText} + ); };