Merge pull request #4887 from spicyj/form-proptypes-dev

Check input and textarea propTypes only in DEV
This commit is contained in:
Ben Alpert committed 2015-09-16 11:31:08 -07:00
commit 2db38bf935
2 files changed
+14 -10

No files matched your search

@@ -61,11 +61,13 @@ var ReactDOMInput = {
},
mountWrapper: function(inst, props) {
LinkedValueUtils.checkPropTypes(
'input',
props,
inst._currentElement._owner
);
if (__DEV__) {
LinkedValueUtils.checkPropTypes(
'input',
props,
inst._currentElement._owner
);
}
var defaultValue = props.defaultValue;
inst._wrapperState = {
@@ -61,11 +61,13 @@ var ReactDOMTextarea = {
},
mountWrapper: function(inst, props) {
LinkedValueUtils.checkPropTypes(
'textarea',
props,
inst._currentElement._owner
);
if (__DEV__) {
LinkedValueUtils.checkPropTypes(
'textarea',
props,
inst._currentElement._owner
);
}
var defaultValue = props.defaultValue;
// TODO (yungsters): Remove support for children content in <textarea>.