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);
}
function replaceStyle(_style) {
style = _style;
function replaceStyle(newStyle) {
style = newStyle;
updateMetas();
if (style.source !== cm.getValue()) {
const cursor = cm.getCursor();
@ -96,9 +96,9 @@ function createSourceEditor(style) {
dirty.clear();
}
function updateStyleMeta(_style) {
dirty.modify('enabled', style.enabled, _style.enabled);
style.enabled = _style.enabled;
function updateStyleMeta(newStyle) {
dirty.modify('enabled', style.enabled, newStyle.enabled);
style.enabled = newStyle.enabled;
}
function toggleStyle() {