mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Test that Node is a function before using instanceof on it
This commit is contained in:
1 parent
ba78edbed8
commit
26179d2b79
1 file changed
+1
-1
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