Merge pull request #128 from tophf/empty-code-section

Editor: show an empty code box for styles with no sections
This commit is contained in:
Jason Barnabe 2015-06-19 21:39:44 -05:00
commit 4d768d8740

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);