Took keyOf outside the function.

This commit is contained in:
Ram Kaniyur
2015-10-28 00:48:54 +11:00
parent e26666fb1e
commit ad654ceb66
@@ -54,6 +54,7 @@ var registrationNameModules = EventPluginRegistry.registrationNameModules;
var CONTENT_TYPES = {'string': true, 'number': true};
var STYLE = keyOf({style: null});
var HTML = keyOf({__html: null});
var ELEMENT_NODE_TYPE = 1;
@@ -259,7 +260,7 @@ function assertValidProps(component, props) {
);
invariant(
typeof props.dangerouslySetInnerHTML === 'object' &&
keyOf({ __html: null }) in props.dangerouslySetInnerHTML,
HTML in props.dangerouslySetInnerHTML,
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' +
'for more information.'