Fix: avoid return short circuit for editor selection

This commit is contained in:
eight 2017-11-09 07:19:22 +08:00
parent 2edd22e37c
commit 92cadc03fa

View File

@ -998,11 +998,11 @@ function jumpToLine(cm) {
} }
function toggleStyle() { function toggleStyle() {
if (!editor) { if (editor) {
editor.toggleStyle();
} else {
toggleSectionStyle(); toggleSectionStyle();
return;
} }
editor.toggleStyle();
} }
function toggleSectionStyle() { function toggleSectionStyle() {
@ -1560,11 +1560,11 @@ function updateLintReportIfEnabled(...args) {
} }
function save() { function save() {
if (!editor) { if (editor) {
editor.save();
} else {
saveSectionStyle(); saveSectionStyle();
return;
} }
editor.save();
} }
function saveSectionStyle() { function saveSectionStyle() {