Editor: show an empty code box for styles with no sections
This commit is contained in:
parent
761b5bd7d9
commit
f48c0da63f
2
edit.js
2
edit.js
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user