Fix function declaration in if statement (#6963)

Firefox doesn't like these and throws.
(cherry picked from commit 3c3c30a19a)
This commit is contained in:
Ben Alpert authored and Paul O’Shannessy committed 2016-06-14 15:49:50 -07:00
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' ||