File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -369,7 +369,7 @@ async function store(state, emitter) {
369
369
emitter . on ( 'close-tab' , ( id ) => {
370
370
log ( 'close-tab' , id )
371
371
const currentTab = state . openFiles . find ( f => f . id === id )
372
- if ( currentTab . hasChanges && currentTab . parentFolder !== null ) {
372
+ if ( currentTab . hasChanges ) {
373
373
let response = confirm ( "Your file has unsaved changes. Are you sure you want to proceed?" )
374
374
if ( ! response ) return false
375
375
}
@@ -1324,7 +1324,7 @@ async function store(state, emitter) {
1324
1324
} )
1325
1325
1326
1326
win . beforeClose ( async ( ) => {
1327
- const hasChanges = ! ! state . openFiles . find ( f => f . parentFolder && f . hasChanges )
1327
+ const hasChanges = ! ! state . openFiles . find ( f => f . hasChanges )
1328
1328
if ( hasChanges ) {
1329
1329
const response = await confirm ( 'You may have unsaved changes. Are you sure you want to proceed?' , 'Yes' , 'Cancel' )
1330
1330
if ( ! response ) return false
You can’t perform that action at this time.
0 commit comments