Editor: show an empty code box for styles with no sections

This commit is contained in:
tophf 2015-06-10 13:03:41 +03:00
parent 761b5bd7d9
commit f48c0da63f

View File

@ -773,7 +773,7 @@ function initWithStyle(style) {
document.querySelectorAll("#sections > div").forEach(function(div) {
div.parentNode.removeChild(div);
});
style.sections.forEach(function(section) {
(style.sections.length == 0 ? [{code: ""}] : style.sections).forEach(function(section) {
setTimeout(function() {
maximizeCodeHeight(addSection(null, section), editors.length == style.sections.length);
}, 0);