smartxml: fix - handle creation of an empty text node
[fnpeditor.git] / src / smartxml / smartxml.js
index 6f3d7de..0a1a354 100644 (file)
@@ -372,7 +372,7 @@ $.extend(Document.prototype, Backbone.Events, {
 
     createDocumentNode: function(from) {
         if(!(from instanceof Node)) {
-            if(from.text) {
+            if(from.text !== undefined) {
                 from = document.createTextNode(from.text);
             } else {
                 var node = $('<' + from.tagName + '>');