From: Aleksander Ɓukasz Date: Mon, 25 Nov 2013 15:55:26 +0000 (+0100) Subject: smartxml: Make sure DocumentNode.sameNode returns a boolean X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/44630cb8d3f935066fa308fad8a23108c79cdae0?ds=inline smartxml: Make sure DocumentNode.sameNode returns a boolean --- diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index 01a0a2a..0b12620 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -82,7 +82,7 @@ $.extend(DocumentNode.prototype, { }, sameNode: function(otherNode) { - return otherNode && this.nativeNode === otherNode.nativeNode; + return !!(otherNode) && this.nativeNode === otherNode.nativeNode; }, parent: function() {