Skip to content

Commit 3d7cd9e

Browse files
🔧 Force close
1 parent 066da64 commit 3d7cd9e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/renderer/state.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,11 @@ export class AppState {
101101
autorun(() => {
102102
if (this.isUnsaved) {
103103
window.onbeforeunload = () => {
104-
return !confirm('The current Fiddle is unsaved. Do you want to exit anyway?');
104+
const result = !confirm('The current Fiddle is unsaved. Do you want to exit anyway?');
105+
106+
if (result) {
107+
window.close();
108+
}
105109
};
106110
} else {
107111
window.onbeforeunload = null;

0 commit comments

Comments
 (0)