Skip to content

Commit 2b07a76

Browse files
Use same autosave heuristic when closing widget
1 parent 505c885 commit 2b07a76

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/src/browser/saveable-service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ export class SaveableService implements FrontendApplicationContribution {
222222
if (!Saveable.isDirty(widget)) {
223223
return false;
224224
}
225-
if (this.autoSave !== 'off') {
225+
const saveable = Saveable.get(widget);
226+
if (this.autoSave !== 'off' && (!saveable || this.shouldAutoSave(widget, saveable))) {
226227
return true;
227228
}
228229
const notLastWithDocument = !Saveable.closingWidgetWouldLoseSaveable(widget, Array.from(this.saveThrottles.keys()));

0 commit comments

Comments
 (0)