Skip to content

Commit 954f9cf

Browse files
committed
Prompting to save before quit also for new files
1 parent b05f397 commit 954f9cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/arduino/store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ async function store(state, emitter) {
13241324
})
13251325

13261326
win.beforeClose(async () => {
1327-
const hasChanges = !!state.openFiles.find(f => f.parentFolder && f.hasChanges)
1327+
const hasChanges = !!state.openFiles.find(f => f.hasChanges)
13281328
if (hasChanges) {
13291329
const response = await confirm('You may have unsaved changes. Are you sure you want to proceed?', 'Yes', 'Cancel')
13301330
if (!response) return false

0 commit comments

Comments
 (0)