File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/core/src/browser Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,12 @@ export class SaveableService implements FrontendApplicationContribution {
222
222
if ( ! Saveable . isDirty ( widget ) ) {
223
223
return false ;
224
224
}
225
- if ( this . autoSave !== 'off' ) {
225
+ const saveable = Saveable . get ( widget ) ;
226
+ if ( ! saveable ) {
227
+ console . warn ( 'Saveable.get returned undefined on a known saveable widget. This is unexpected.' ) ;
228
+ }
229
+ // Enter branch if saveable absent since we cannot check autosaveability more definitely.
230
+ if ( this . autoSave !== 'off' && ( ! saveable || this . shouldAutoSave ( widget , saveable ) ) ) {
226
231
return true ;
227
232
}
228
233
const notLastWithDocument = ! Saveable . closingWidgetWouldLoseSaveable ( widget , Array . from ( this . saveThrottles . keys ( ) ) ) ;
You can’t perform that action at this time.
0 commit comments