From 104b99ffa04db15768ca30025a212ef1f6d9609f Mon Sep 17 00:00:00 2001 From: Kevin Cunnane Date: Wed, 1 May 2019 12:28:36 -0700 Subject: [PATCH] Fix #4553 Azure account prompt (#5303) "Are you sure" prompt on removing Azure account does not respect "No" --- src/sql/platform/accounts/common/accountActions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sql/platform/accounts/common/accountActions.ts b/src/sql/platform/accounts/common/accountActions.ts index 90af8499ef..1caabce8c7 100644 --- a/src/sql/platform/accounts/common/accountActions.ts +++ b/src/sql/platform/accounts/common/accountActions.ts @@ -10,7 +10,7 @@ import { Action } from 'vs/base/common/actions'; import { error } from 'sql/base/common/log'; import { IAccountManagementService } from 'sql/platform/accounts/common/interfaces'; -import { IDialogService, IConfirmation } from 'vs/platform/dialogs/common/dialogs'; +import { IDialogService, IConfirmation, IConfirmationResult } from 'vs/platform/dialogs/common/dialogs'; import { INotificationService } from 'vs/platform/notification/common/notification'; import Severity from 'vs/base/common/severity'; @@ -86,8 +86,8 @@ export class RemoveAccountAction extends Action { type: 'question' }; - return this._dialogService.confirm(confirm).then(result => { - if (!result) { + return this._dialogService.confirm(confirm).then((result: IConfirmationResult) => { + if (!result || !result.confirmed) { return Promise.resolve(false); } else { return Promise.resolve(this._accountManagementService.removeAccount(this._account.key)).catch(err => {