smartxml: fix
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 26 Nov 2013 13:09:58 +0000 (14:09 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 26 Nov 2013 13:09:58 +0000 (14:09 +0100)
src/smartxml/smartxml.js

index a60ae9a..5004863 100644 (file)
@@ -184,7 +184,7 @@ $.extend(ElementNode.prototype, {
 
     detach: function() {
         var next;
 
     detach: function() {
         var next;
-        if(parent && this.isSurroundedByTextElements()) {
+        if(this.parent() && this.isSurroundedByTextElements()) {
             next = this.next();
             this.prev().appendText(next.getText());
             next.detach();
             next = this.next();
             this.prev().appendText(next.getText());
             next.detach();