Fix: onbeforeunload handler would disable the save button

This commit is contained in:
eight 2017-10-07 18:10:00 +08:00
parent 40a1781a53
commit 765231581c

View File

@ -502,7 +502,7 @@ window.onbeforeunload = () => {
rememberWindowSize();
}
document.activeElement.blur();
if (isCleanGlobal() && (!editor || !editor.isDirty())) {
if ((!editor && isCleanGlobal()) || (editor && !editor.isDirty())) {
return;
}
updateLintReportIfEnabled(null, 0);