mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Bug fix to return authType as undefined if displayName is not set (#8731)
We noticed that if displayName is undefined this method would return the first auth type it found as getAuthTypeDisplayName() would return undefined. If the displayName is undefined, we would not have a matchingTYpe and it should be undefined.
This commit is contained in:
@@ -915,6 +915,9 @@ export class ConnectionWidget extends lifecycle.Disposable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private getMatchingAuthType(displayName: string): AuthenticationType {
|
private getMatchingAuthType(displayName: string): AuthenticationType {
|
||||||
|
if (!displayName) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
return find(ConnectionWidget._authTypes, authType => this.getAuthTypeDisplayName(authType) === displayName);
|
return find(ConnectionWidget._authTypes, authType => this.getAuthTypeDisplayName(authType) === displayName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user