From 909d022562dd402e0cccce71902a70fe17840d30 Mon Sep 17 00:00:00 2001 From: Aditya Bist Date: Wed, 20 Apr 2022 13:05:53 -0700 Subject: [PATCH] change style (#19159) --- .../services/tableDesigner/browser/tableDesignerService.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sql/workbench/services/tableDesigner/browser/tableDesignerService.ts b/src/sql/workbench/services/tableDesigner/browser/tableDesignerService.ts index bfabcb7e23..74a13a74df 100644 --- a/src/sql/workbench/services/tableDesigner/browser/tableDesignerService.ts +++ b/src/sql/workbench/services/tableDesigner/browser/tableDesignerService.ts @@ -31,9 +31,8 @@ export class TableDesignerService implements ITableDesignerService { private _providers = new Map(); private async confirmBeforeExit(): Promise { - let openTableDesignerEditors = this._editorService.editors.filter(e => e instanceof TableDesignerInput); - let dirtyEditors = openTableDesignerEditors.find(e => e.isDirty()); - if (dirtyEditors) { + let dirtyTableDesigners = this._editorService.editors.filter(e => e instanceof TableDesignerInput && e.isDirty()); + if (dirtyTableDesigners.length > 0) { let result = await this._dialogService.confirm({ message: localize('TableDesigner.saveBeforeExit', 'There are unsaved changes in Table Designer that will be lost if you close the application. Do you want to close the application?'), primaryButton: localize({ key: 'TableDesigner.closeApplication', comment: ['&& denotes a mnemonic'] }, "&&Close Application"),