Fix: drop unused getCode
This commit is contained in:
parent
f133c3e67a
commit
2c2d849fa4
|
@ -121,7 +121,6 @@ function createSection({
|
|||
el,
|
||||
cm,
|
||||
render,
|
||||
getCode,
|
||||
getModel,
|
||||
remove,
|
||||
destroy,
|
||||
|
@ -265,10 +264,6 @@ function createSection({
|
|||
showHelp(t('appliesLabel'), t('appliesHelp'));
|
||||
}
|
||||
|
||||
function getCode() {
|
||||
return cm.getValue();
|
||||
}
|
||||
|
||||
function remove() {
|
||||
linter.disableForEditor(cm);
|
||||
el.classList.add('removed');
|
||||
|
|
|
@ -485,7 +485,7 @@ function createSectionsEditor(style) {
|
|||
if (sections.every(s => s.isRemoved() || s === section)) {
|
||||
throw new Error('Cannot remove last section');
|
||||
}
|
||||
if (!section.getCode()) {
|
||||
if (section.cm.isBlank()) {
|
||||
const index = sections.indexOf(section);
|
||||
sections.splice(index, 1);
|
||||
section.el.remove();
|
||||
|
|
Loading…
Reference in New Issue
Block a user