diff --git a/src/dom/components/ReactDOMInput.js b/src/dom/components/ReactDOMInput.js index 7b45aef515..2e22c4ffe5 100644 --- a/src/dom/components/ReactDOMInput.js +++ b/src/dom/components/ReactDOMInput.js @@ -48,7 +48,7 @@ var ReactDOMInput = ReactCompositeComponent.createClass({ getInitialState: function() { return { checked: this.props.defaultChecked || false, - value: this.props.defaultValue || '' + value: this.props.defaultValue != null ? this.props.defaultValue : '' }; }, diff --git a/src/dom/components/ReactDOMTextarea.js b/src/dom/components/ReactDOMTextarea.js index 2d1beb7795..6fe8992b37 100644 --- a/src/dom/components/ReactDOMTextarea.js +++ b/src/dom/components/ReactDOMTextarea.js @@ -77,7 +77,9 @@ var ReactDOMTextarea = ReactCompositeComponent.createClass({ ); defaultValue = '' + children; } - defaultValue = defaultValue || ''; + if (defaultValue == null) { + defaultValue = ''; + } return { // We save the initial value so that `ReactNativeComponent` doesn't update // `textContent` (unnecessary since we update value).