Skip to content

Commit

Permalink
Fix parser adding empty class attributes everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Pulges committed Oct 28, 2015
1 parent d7fa24e commit b83d204
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dom/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b83d204

Please sign in to comment.