From 0ebc2cacc74b83efe2ec3ddb7e7fad7d4c796a4b Mon Sep 17 00:00:00 2001 From: radubrehar Date: Tue, 9 Aug 2016 18:47:32 +0300 Subject: [PATCH] Fix NumberInput when displayValue is NaN --- modules/client/components/NumberTextInput.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/client/components/NumberTextInput.js b/modules/client/components/NumberTextInput.js index 02fab47..79027e6 100644 --- a/modules/client/components/NumberTextInput.js +++ b/modules/client/components/NumberTextInput.js @@ -31,8 +31,10 @@ class NumberTextInput extends React.Component { const { value } = this.state const displayValue = this.props.formatNumber(value) + const inputValue = isNaN(displayValue) ? 0 : displayValue + return ( - + ) } }