smartxml: Make sure DocumentNode.sameNode returns a boolean
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 25 Nov 2013 15:55:26 +0000 (16:55 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 25 Nov 2013 15:55:26 +0000 (16:55 +0100)
src/smartxml/smartxml.js

index 01a0a2a..0b12620 100644 (file)
@@ -82,7 +82,7 @@ $.extend(DocumentNode.prototype, {
     },
 
     sameNode: function(otherNode) {
     },
 
     sameNode: function(otherNode) {
-        return otherNode && this.nativeNode === otherNode.nativeNode;
+        return !!(otherNode) && this.nativeNode === otherNode.nativeNode;
     },
 
     parent: function() {
     },
 
     parent: function() {