mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Fix function declaration in if statement (#6963)
Firefox doesn't like these and throws.
(cherry picked from commit 3c3c30a19a)
This commit is contained in:
1 parent
6562466c9e
commit
6080ab547d
3 files changed
+7
-6
No files matched your search
@@ -210,7 +210,7 @@ ReactElement.createElement = function(type, config, children) {
|
||||
type;
|
||||
|
||||
// Create dummy `key` and `ref` property to `props` to warn users against its use
|
||||
function warnAboutAccessingKey() {
|
||||
var warnAboutAccessingKey = function() {
|
||||
if (!specialPropKeyWarningShown) {
|
||||
specialPropKeyWarningShown = true;
|
||||
warning(
|
||||
@@ -223,10 +223,10 @@ ReactElement.createElement = function(type, config, children) {
|
||||
);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
warnAboutAccessingKey.isReactWarning = true;
|
||||
|
||||
function warnAboutAccessingRef() {
|
||||
var warnAboutAccessingRef = function() {
|
||||
if (!specialPropRefWarningShown) {
|
||||
specialPropRefWarningShown = true;
|
||||
warning(
|
||||
@@ -239,7 +239,7 @@ ReactElement.createElement = function(type, config, children) {
|
||||
);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
warnAboutAccessingRef.isReactWarning = true;
|
||||
|
||||
if (typeof props.$$typeof === 'undefined' ||
|
||||
|
||||
Reference in new issue
Block a user