Merge pull request #5166 from spicyj/gh-5157

Add feature test for document.createEvent
(cherry picked from commit da1135618e)
This commit is contained in:
Sebastian Markbåge authored and Paul O’Shannessy committed 2015-10-28 12:42:15 -07:00
1 parent 6384e56d8d
commit 6323f03148
1 file changed
+3 -1
+3 -1
View File
@@ -61,7 +61,9 @@ if (__DEV__) {
* real browser event.
*/
if (typeof window !== 'undefined' &&
typeof window.dispatchEvent === 'function') {
typeof window.dispatchEvent === 'function' &&
typeof document !== 'undefined' &&
typeof document.createEvent === 'function') {
var fakeNode = document.createElement('react');
ReactErrorUtils.invokeGuardedCallback = function(name, func, a, b) {
var boundFunc = func.bind(null, a, b);