Skip to content

Commit

Permalink
fix Common.isElement, closes #501, closes #507, closes #459, closes #468
Browse files Browse the repository at this point in the history
, closes #517
  • Loading branch information
liabru committed Nov 22, 2017
1 parent 9eae36f commit 18a0845
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/Common.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@ module.exports = Common;
* @return {boolean} True if the object is a HTMLElement, otherwise false
*/
Common.isElement = function(obj) {
return obj instanceof HTMLElement;
if (typeof HTMLElement !== 'undefined') {
return obj instanceof HTMLElement;
}

return !!(obj.nodeType && obj.nodeName);
};

/**
Expand Down

0 comments on commit 18a0845

Please sign in to comment.