build: don't strip 'use strict'
[fnpeditor.git] / src / smartxml / smartxml.js
index f92bf01..d42dcbf 100644 (file)
@@ -276,6 +276,9 @@ $.extend(Document.prototype, Backbone.Events, {
                     /* globals document */
                     from = document.createTextNode(from.text);
                 } else {
                     /* globals document */
                     from = document.createTextNode(from.text);
                 } else {
+                    if(!from.tagName) {
+                        throw new Error('tagName missing');
+                    }
                     var node = $('<' + from.tagName + '>');
 
                     _.keys(from.attrs || {}).forEach(function(key) {
                     var node = $('<' + from.tagName + '>');
 
                     _.keys(from.attrs || {}).forEach(function(key) {