Add feature test for document.createEvent
See #5157.
Ben Alpert committed
Oct 13, 2015 at 16:34 UTC
1206d8d2eb5ee1ae26d41be877d0cfb788528ff0
1 file changed
+3
-1
src/shared/utils/ReactErrorUtils.js
+3
-1
@@ -61,7 +61,9 @@ if (__DEV__) {
61
* real browser event.
62
*/
63
if (typeof window !== 'undefined' &&
64
- typeof window.dispatchEvent === 'function') {
64
+ typeof window.dispatchEvent === 'function' &&
65
+ typeof document !== 'undefined' &&
66
+ typeof document.createEvent === 'function') {
67
var fakeNode = document.createElement('react');
68
ReactErrorUtils.invokeGuardedCallback = function(name, func, a, b) {
69
var boundFunc = func.bind(null, a, b);