mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Merge pull request #4887 from spicyj/form-proptypes-dev
Check input and textarea propTypes only in DEV
This commit is contained in:
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>.
|
||||
|
||||
Reference in new issue
Block a user