Bug fix.
This commit is contained in:
@@ -72,7 +72,7 @@ class MutablePgpKeyStore implements MutableKeyStore{
|
||||
}
|
||||
|
||||
getPrivateKey(): any {
|
||||
return keyring.privateKeys.keys[0];
|
||||
return keyring.privateKeys && keyring.privateKeys.keys[0];
|
||||
}
|
||||
|
||||
async isValidKey(key): Promise<boolean> {
|
||||
@@ -94,7 +94,8 @@ class MutablePgpKeyStore implements MutableKeyStore{
|
||||
|
||||
getFingerprint(): string {
|
||||
// TODO Handle multiple keys
|
||||
return keyring.privateKeys.keys[0].keyPacket.fingerprint;
|
||||
return keyring.privateKeys && keyring.privateKeys.keys[0] && keyring.privateKeys.keys[0].keyPacket &&
|
||||
keyring.privateKeys.keys[0].keyPacket.fingerprint;
|
||||
}
|
||||
|
||||
getKeyId(key: any): string {
|
||||
|
||||
Reference in New Issue
Block a user