Missing changes (#8972)

* add more folders to strictire compile, add more strict compile options

* update ci

* remove unnecessary assertion

* add missing checks
This commit is contained in:
Anthony Dresser
2020-01-27 16:47:42 -08:00
committed by GitHub
parent 64929de09d
commit 5fd29d5ad8

View File

@@ -76,7 +76,7 @@ export class ConnectionProfileGroup extends Disposable implements IConnectionPro
} }
public hasChildren(): boolean { public hasChildren(): boolean {
if ((this.children && this.children.length > 0) || (this.connections && this.connections.length > 0)) { if (this.children.length > 0 || this.connections.length > 0) {
return true; return true;
} }
return false; return false;
@@ -86,7 +86,6 @@ export class ConnectionProfileGroup extends Disposable implements IConnectionPro
* Returns true if all connections in the tree have valid options using the correct capabilities * Returns true if all connections in the tree have valid options using the correct capabilities
*/ */
public get hasValidConnections(): boolean { public get hasValidConnections(): boolean {
if (this.connections) {
let invalidConnections = find(this.connections, c => !c.isConnectionOptionsValid); let invalidConnections = find(this.connections, c => !c.isConnectionOptionsValid);
if (invalidConnections !== undefined) { if (invalidConnections !== undefined) {
return false; return false;
@@ -100,24 +99,17 @@ export class ConnectionProfileGroup extends Disposable implements IConnectionPro
}); });
return childrenAreValid; return childrenAreValid;
} }
} else {
return true;
}
} }
public getChildren(): (ConnectionProfile | ConnectionProfileGroup)[] { public getChildren(): (ConnectionProfile | ConnectionProfileGroup)[] {
let allChildren: (ConnectionProfile | ConnectionProfileGroup)[] = []; let allChildren: (ConnectionProfile | ConnectionProfileGroup)[] = [];
if (this.connections) {
this.connections.forEach((conn) => { this.connections.forEach((conn) => {
allChildren.push(conn); allChildren.push(conn);
}); });
}
if (this.children) {
this.children.forEach((group) => { this.children.forEach((group) => {
allChildren.push(group); allChildren.push(group);
}); });
}
return allChildren; return allChildren;
} }