splice not delete

This commit is contained in:
Drew Ansbacher
2021-09-20 13:12:29 -06:00
committed by Aiden McClelland
parent 1fa97164ea
commit 289aef9693

View File

@@ -63,6 +63,7 @@ export class SSHKeysPage {
try {
const key = await this.embassyApi.addSshKey({ key: pubkey })
console.log('key', key)
this.sshKeys.push(key)
} catch (e) {
this.errToast.present(e)
@@ -103,7 +104,7 @@ export class SSHKeysPage {
try {
const entry = this.sshKeys[i]
await this.embassyApi.deleteSshKey({ fingerprint: entry.fingerprint })
delete this.sshKeys[i]
this.sshKeys.splice(i, 1)
} catch (e) {
this.errToast.present(e)
} finally {