mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
This reverts commit 22a427f934.
This commit is contained in:
@@ -20,8 +20,6 @@ import { Deferred } from 'sql/base/common/promise';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { firstIndex } from 'vs/base/common/arrays';
|
||||
import { values } from 'vs/base/common/collections';
|
||||
|
||||
export class AccountManagementService implements IAccountManagementService {
|
||||
// CONSTANTS ///////////////////////////////////////////////////////////
|
||||
@@ -168,7 +166,7 @@ export class AccountManagementService implements IAccountManagementService {
|
||||
}
|
||||
if (result.accountModified) {
|
||||
// Find the updated account and splice the updated on in
|
||||
let indexToRemove: number = firstIndex(provider.accounts, account => {
|
||||
let indexToRemove: number = provider.accounts.findIndex(account => {
|
||||
return account.key.accountId === result.changedAccount.key.accountId;
|
||||
});
|
||||
if (indexToRemove >= 0) {
|
||||
@@ -186,7 +184,7 @@ export class AccountManagementService implements IAccountManagementService {
|
||||
* @returns Registered account providers
|
||||
*/
|
||||
public getAccountProviderMetadata(): Thenable<azdata.AccountProviderMetadata[]> {
|
||||
return Promise.resolve(values(this._providers).map(provider => provider.metadata));
|
||||
return Promise.resolve(Object.values(this._providers).map(provider => provider.metadata));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -243,7 +241,7 @@ export class AccountManagementService implements IAccountManagementService {
|
||||
return result;
|
||||
}
|
||||
|
||||
let indexToRemove: number = firstIndex(provider.accounts, account => {
|
||||
let indexToRemove: number = provider.accounts.findIndex(account => {
|
||||
return account.key.accountId === accountKey.accountId;
|
||||
});
|
||||
|
||||
@@ -425,7 +423,7 @@ export class AccountManagementService implements IAccountManagementService {
|
||||
|
||||
private spliceModifiedAccount(provider: AccountProviderWithMetadata, modifiedAccount: azdata.Account) {
|
||||
// Find the updated account and splice the updated one in
|
||||
let indexToRemove: number = firstIndex(provider.accounts, account => {
|
||||
let indexToRemove: number = provider.accounts.findIndex(account => {
|
||||
return account.key.accountId === modifiedAccount.key.accountId;
|
||||
});
|
||||
if (indexToRemove >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user