From 44630cb8d3f935066fa308fad8a23108c79cdae0 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Aleksander=20=C5=81ukasz?=
 <aleksander.lukasz@nowoczesnapolska.org.pl>
Date: Mon, 25 Nov 2013 16:55:26 +0100
Subject: [PATCH] smartxml: Make sure DocumentNode.sameNode returns a boolean

---
 src/smartxml/smartxml.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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() {
-- 
2.20.1