Mangle __html in prop validation.
Ram Kaniyur committed
Oct 28, 2015 at 00:18 UTC
e26666fb1e1a6077bbe3375a4060439b3d5cfaaf
1 file changed
+1
-1
src/renderers/dom/shared/ReactDOMComponent.js
+1
-1
@@ -259,7 +259,7 @@ function assertValidProps(component, props) {
259
);
260
invariant(
261
typeof props.dangerouslySetInnerHTML === 'object' &&
262
- '__html' in props.dangerouslySetInnerHTML,
262
+ keyOf({ __html: null }) in props.dangerouslySetInnerHTML,
263
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
264
'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' +
265
'for more information.'