From ad0b70d016f4b80b435d74bc3ed148faacbe9143 Mon Sep 17 00:00:00 2001 From: bumbu Date: Fri, 13 Feb 2015 23:09:35 +0700 Subject: [PATCH] Fix isElement detection in Firefox --- src/utilities.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utilities.js b/src/utilities.js index 69922ff..82a057c 100644 --- a/src/utilities.js +++ b/src/utilities.js @@ -27,8 +27,8 @@ module.exports = { */ , isElement: function(o){ return ( - typeof HTMLElement === 'object' ? (o instanceof HTMLElement || o instanceof SVGElement || o instanceof SVGSVGElement) : //DOM2 - o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string' + o instanceof HTMLElement || o instanceof SVGElement || o instanceof SVGSVGElement || //DOM2 + (o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string') ); }