Fix: beforeunload warning
This commit is contained in:
parent
fa06b29748
commit
b102aa0704
|
@ -597,7 +597,7 @@ window.onbeforeunload = () => {
|
|||
rememberWindowSize();
|
||||
}
|
||||
document.activeElement.blur();
|
||||
if (isCleanGlobal()) {
|
||||
if (isCleanGlobal() && (!editor || !editor.isDirty())) {
|
||||
return;
|
||||
}
|
||||
updateLintReportIfEnabled(null, 0);
|
||||
|
|
|
@ -138,5 +138,5 @@ function createSourceEditor(style) {
|
|||
});
|
||||
}
|
||||
|
||||
return {replaceStyle, save, toggleStyle, updateStyleMeta};
|
||||
return {replaceStyle, save, toggleStyle, updateStyleMeta, isDirty: dirty.isDirty};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user