mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Merge pull request #5663 from jonathanp/fix-code-comment
Rephrase comment to better describe use of `warning()`
This commit is contained in:
commit
6c8cbcae8f
1 file changed
+1
-1
@@ -389,7 +389,7 @@ function validateTypeDef(Constructor, typeDef, location) {
|
||||
for (var propName in typeDef) {
|
||||
if (typeDef.hasOwnProperty(propName)) {
|
||||
// use a warning instead of an invariant so components
|
||||
// don't show up in prod but not in __DEV__
|
||||
// don't show up in prod but only in __DEV__
|
||||
warning(
|
||||
typeof typeDef[propName] === 'function',
|
||||
'%s: %s type `%s` is invalid; it must be a function, usually from ' +
|
||||
|
||||
Reference in new issue
Block a user