Fix: _style -> newStyle

This commit is contained in:
eight 2017-09-13 01:39:45 +08:00
parent 93fe23f2a6
commit 279c7d05a7

View File

@ -85,8 +85,8 @@ function createSourceEditor(style) {
$('#beautify').disabled = Boolean(style.preprocessor); $('#beautify').disabled = Boolean(style.preprocessor);
} }
function replaceStyle(_style) { function replaceStyle(newStyle) {
style = _style; style = newStyle;
updateMetas(); updateMetas();
if (style.source !== cm.getValue()) { if (style.source !== cm.getValue()) {
const cursor = cm.getCursor(); const cursor = cm.getCursor();
@ -96,9 +96,9 @@ function createSourceEditor(style) {
dirty.clear(); dirty.clear();
} }
function updateStyleMeta(_style) { function updateStyleMeta(newStyle) {
dirty.modify('enabled', style.enabled, _style.enabled); dirty.modify('enabled', style.enabled, newStyle.enabled);
style.enabled = _style.enabled; style.enabled = newStyle.enabled;
} }
function toggleStyle() { function toggleStyle() {