From: Aleksander Ɓukasz Date: Tue, 26 Nov 2013 13:09:58 +0000 (+0100) Subject: smartxml: fix X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/f0b728185fbc463f932a0329c1fcb1602101c206 smartxml: fix --- diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index a60ae9a..5004863 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -184,7 +184,7 @@ $.extend(ElementNode.prototype, { detach: function() { var next; - if(parent && this.isSurroundedByTextElements()) { + if(this.parent() && this.isSurroundedByTextElements()) { next = this.next(); this.prev().appendText(next.getText()); next.detach();