Fix: isWarm -> isTouched
This commit is contained in:
parent
6d411c01fc
commit
d93bf05f64
|
@ -1894,7 +1894,7 @@ chrome.runtime.onMessage.addListener(onRuntimeMessage);
|
||||||
|
|
||||||
function replaceStyle(request) {
|
function replaceStyle(request) {
|
||||||
const codeIsUpdated = request.codeIsUpdated !== false;
|
const codeIsUpdated = request.codeIsUpdated !== false;
|
||||||
if (codeIsUpdated && editor && editor.isWarm() && !confirm(t('styleUpdateDiscardChanges'))) {
|
if (codeIsUpdated && editor && editor.isTouched() && !confirm(t('styleUpdateDiscardChanges'))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
doReplace();
|
doReplace();
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function createSourceEditor(style) {
|
function createSourceEditor(style) {
|
||||||
// a flag for isWarm()
|
// a flag for isTouched()
|
||||||
let hadBeenSaved = false;
|
let hadBeenSaved = false;
|
||||||
|
|
||||||
// draw HTML
|
// draw HTML
|
||||||
|
@ -242,7 +242,7 @@ ${section}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function isWarm() {
|
function isTouched() {
|
||||||
// indicate that the editor had been touched by the user
|
// indicate that the editor had been touched by the user
|
||||||
return dirty.isDirty() || hadBeenSaved;
|
return dirty.isDirty() || hadBeenSaved;
|
||||||
}
|
}
|
||||||
|
@ -260,6 +260,6 @@ ${section}
|
||||||
toggleStyle,
|
toggleStyle,
|
||||||
isDirty: dirty.isDirty,
|
isDirty: dirty.isDirty,
|
||||||
getStyle: () => style,
|
getStyle: () => style,
|
||||||
isWarm
|
isTouched
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user