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) {
369369 emitter . on ( 'close-tab' , ( id ) => {
370370 log ( 'close-tab' , id )
371371 const currentTab = state . openFiles . find ( f => f . id === id )
372- if ( currentTab . hasChanges && currentTab . parentFolder !== null ) {
372+ if ( currentTab . hasChanges ) {
373373 let response = confirm ( "Your file has unsaved changes. Are you sure you want to proceed?" )
374374 if ( ! response ) return false
375375 }
@@ -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
You can’t perform that action at this time.
0 commit comments