diff --git a/src/dom/parse.js b/src/dom/parse.js index d42e33e..6358922 100644 --- a/src/dom/parse.js +++ b/src/dom/parse.js @@ -590,7 +590,9 @@ wysihtml5.dom.parse = function(elementOrHtml_current, config_current) { attributes["class"] = oldNode.getAttribute("class"); } } else { - attributes["class"] = wysihtml5.lang.array(classes).unique().join(" "); + if(classes && classes.length > 0) { + attributes["class"] = wysihtml5.lang.array(classes).unique().join(" "); + } } } else { // make sure that wysihtml5 temp class doesn't get stripped out