Check input and textarea propTypes only in DEV

This commit is contained in:
Ben Alpert committed 2015-09-15 21:46:37 -07:00
1 parent 0cc8af37c3
commit 65370ff752
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>.