mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-24 01:25:37 -05:00
Make connectionProfileGroup support undefined values (#9102)
* Make connectionProfileGroup able to support undefined values being passed * Fix strict null checks * More strict null check fixes
This commit is contained in:
@@ -117,14 +117,14 @@ export function generateUriWithPrefix(connection: IConnectionProfile, prefix: st
|
||||
|
||||
export function findProfileInGroup(og: IConnectionProfile, groups: ConnectionProfileGroup[]): ConnectionProfile | undefined {
|
||||
for (let group of groups) {
|
||||
for (let conn of group.connections) {
|
||||
for (let conn of group.connections!) {
|
||||
if (conn.id === og.id) {
|
||||
return conn;
|
||||
}
|
||||
}
|
||||
|
||||
if (group.hasChildren()) {
|
||||
let potentialReturn = findProfileInGroup(og, group.children);
|
||||
let potentialReturn = findProfileInGroup(og, group.children!);
|
||||
if (potentialReturn) {
|
||||
return potentialReturn;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user