mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Test that Node is a function before using instanceof on it
This commit is contained in:
Vendored
+1
-1
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
function isNode(object) {
|
||||
return !!(object && (
|
||||
typeof Node !== 'undefined' ? object instanceof Node :
|
||||
typeof Node === 'function' ? object instanceof Node :
|
||||
typeof object === 'object' &&
|
||||
typeof object.nodeType === 'number' &&
|
||||
typeof object.nodeName === 'string'
|
||||
|
||||
Reference in New Issue
Block a user