We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41ad6b4 commit c97e311Copy full SHA for c97e311
packages/core/src/browser/saveable-service.ts
@@ -222,7 +222,12 @@ export class SaveableService implements FrontendApplicationContribution {
222
if (!Saveable.isDirty(widget)) {
223
return false;
224
}
225
- if (this.autoSave !== 'off') {
+ 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))) {
231
return true;
232
233
const notLastWithDocument = !Saveable.closingWidgetWouldLoseSaveable(widget, Array.from(this.saveThrottles.keys()));
0 commit comments