aboutsummaryrefslogtreecommitdiff
path: root/bundle/src/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'bundle/src/main.js')
-rw-r--r--bundle/src/main.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundle/src/main.js b/bundle/src/main.js
index 6734bc4..971816e 100644
--- a/bundle/src/main.js
+++ b/bundle/src/main.js
@@ -190,7 +190,7 @@ try {
if (running) await invoke('stop_run');
// Finish any pending save/open or stopped run before closing the document.
await actionDone;
- if (!await canReplace()) return;
+ if (dirty() && !await saveFile()) return;
await window.destroy();
} catch (error) { report(error); } finally {
closing = false;