From d801e64ba8692777df78e1ec9427d11cda6dec8f Mon Sep 17 00:00:00 2001 From: Juan Cortes Ross Date: Sun, 26 Aug 2018 22:20:35 +0200 Subject: [PATCH] Refuse to pass the change event if there's no value selected to avoid crash from issue-1457 --- src/components/base/InputCurrency/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/base/InputCurrency/index.js b/src/components/base/InputCurrency/index.js index db6c8c8e..5fa7c9d8 100644 --- a/src/components/base/InputCurrency/index.js +++ b/src/components/base/InputCurrency/index.js @@ -172,7 +172,7 @@ class InputCurrency extends PureComponent { renderListUnits = () => { const { units, onChangeUnit, unit } = this.props const { isFocused } = this.state - + const avoidEmptyValue = value => value && onChangeUnit(value) if (units.length <= 1) { return null } @@ -180,7 +180,7 @@ class InputCurrency extends PureComponent { return (