From a6f159cc7106dcf29679fcad0f2cc16ce111c0d4 Mon Sep 17 00:00:00 2001 From: Greg Vincent Date: Thu, 15 Sep 2016 15:12:46 -0700 Subject: [PATCH] Fixes issue preventing propagation of Blur event when field value is null --- src/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index ec18915..1e16bf7 100644 --- a/src/index.js +++ b/src/index.js @@ -51,7 +51,7 @@ export default class NumberFormatInput extends Component { const handler = this._eventHandlers[key]; this._eventHandlers[key] = e => { const result = handler(e); - if (result && this.props[key]) this.props[key](result); + this.props[key] && this.props[key](result); }; }); } @@ -95,4 +95,3 @@ NumberFormatInput.propTypes = { onBlur: PropTypes.func, value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), }; -