Fix #105895, duplicate auth providers in vscode.authentication.providers

This commit is contained in:
Rachel Macfarlane
2020-09-02 13:55:29 -07:00
parent 79de645f6d
commit 9cc09931cd

View File

@@ -187,9 +187,9 @@ export class ExtHostAuthentication implements ExtHostAuthenticationShape {
}
$onDidChangeAuthenticationProviders(added: modes.AuthenticationProviderInformation[], removed: modes.AuthenticationProviderInformation[]) {
added.forEach(id => {
if (!this._providers.includes(id)) {
this._providers.push(id);
added.forEach(provider => {
if (!this._providers.some(p => p.id === provider.id)) {
this._providers.push(provider);
}
});