Commit d90f41e 1 parent d34c0b3 commit d90f41e Copy full SHA for d90f41e
File tree 1 file changed +6
-2
lines changed
packages/core/src/browser
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,10 @@ export class SaveableService implements FrontendApplicationContribution {
174
174
setDirty ( saveableWidget , saveable . dirty ) ;
175
175
saveable . onDirtyChanged ( ( ) => setDirty ( saveableWidget , saveable . dirty ) ) ;
176
176
const closeWithSaving = this . createCloseWithSaving ( ) ;
177
- const closeWithoutSaving = ( ) => this . closeWithoutSaving ( saveableWidget , false ) ;
177
+ const closeWithoutSaving = async ( ) => {
178
+ const revert = Saveable . closingWidgetWouldLoseSaveable ( saveableWidget , Array . from ( this . saveThrottles . keys ( ) ) ) ;
179
+ await this . closeWithoutSaving ( saveableWidget , revert ) ;
180
+ } ;
178
181
Object . assign ( saveableWidget , {
179
182
closeWithoutSaving,
180
183
closeWithSaving,
@@ -224,7 +227,8 @@ export class SaveableService implements FrontendApplicationContribution {
224
227
}
225
228
const notLastWithDocument = ! Saveable . closingWidgetWouldLoseSaveable ( widget , Array . from ( this . saveThrottles . keys ( ) ) ) ;
226
229
if ( notLastWithDocument ) {
227
- return widget . closeWithoutSaving ( false ) . then ( ( ) => undefined ) ;
230
+ await widget . closeWithoutSaving ( false ) ;
231
+ return undefined ;
228
232
}
229
233
if ( options && options . shouldSave ) {
230
234
return options . shouldSave ( ) ;
You can’t perform that action at this time.
0 commit comments