smartxml: Make sure DocumentNode.sameNode returns a boolean
[fnpeditor.git] / src / smartxml / smartxml.js
index 01a0a2a..0b12620 100644 (file)
@@ -82,7 +82,7 @@ $.extend(DocumentNode.prototype, {
     },
 
     sameNode: function(otherNode) {
-        return otherNode && this.nativeNode === otherNode.nativeNode;
+        return !!(otherNode) && this.nativeNode === otherNode.nativeNode;
     },
 
     parent: function() {