From 02aa7e89997fd35f7c57dd300507b5dd9ad64992 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Thu, 24 Oct 2013 11:33:38 +0200 Subject: [PATCH 1/1] smartxml: handling undefined value sent to DocumentNode.sameNode --- 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 6e00a7d..7c68e06 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -29,7 +29,7 @@ $.extend(DocumentNode.prototype, { detach: function() { this._$.detach(); }, sameNode: function(otherNode) { - return this.nativeNode === otherNode.nativeNode; + return otherNode && this.nativeNode === otherNode.nativeNode; }, parent: function() { -- 2.20.1