Test that Node is a function before using instanceof on it
evanc committed
Feb 25, 2014 at 17:55 UTC
26179d2b79fd1eba4a9db10cb4a5ce615f6b6c51
1 file changed
+1
-1
src/vendor/core/dom/isNode.js
+1
-1
@@ -23,7 +23,7 @@
23
*/
24
function isNode(object) {
25
return !!(object && (
26
- typeof Node !== 'undefined' ? object instanceof Node :
26
+ typeof Node === 'function' ? object instanceof Node :
27
typeof object === 'object' &&
28
typeof object.nodeType === 'number' &&
29
typeof object.nodeName === 'string'