strict null checks

This commit is contained in:
Eugene Pankov
2019-09-18 20:56:59 +02:00
parent 9b904856fa
commit 181c523020
62 changed files with 202 additions and 170 deletions

View File

@@ -97,7 +97,7 @@ export class SSHSettingsTabComponent {
}
)).response === 1) {
for (const connection of this.connections.filter(x => x.group === group.name)) {
connection.group = null
connection.group = undefined
}
this.config.save()
this.refresh()
@@ -109,14 +109,14 @@ export class SSHSettingsTabComponent {
this.childGroups = []
for (const connection of this.connections) {
connection.group = connection.group || null
connection.group = connection.group || undefined
let group = this.childGroups.find(x => x.name === connection.group)
if (!group) {
group = {
name: connection.group,
name: connection.group!,
connections: [],
}
this.childGroups.push(group)
this.childGroups.push(group!)
}
group.connections.push(connection)
}