Fix a few issues with linking a new Desktop instance

This commit is contained in:
Scott Nonnenberg 2021-01-15 08:57:09 -08:00
parent 8bff6e24f0
commit 4eb49ff304
5 changed files with 32 additions and 22 deletions

View file

@ -544,8 +544,13 @@
const identityRecord = this.getIdentityRecord(identifier);
if (isOurIdentifier) {
const existing = identityRecord ? identityRecord.publicKey : null;
return equalArrayBuffers(existing, publicKey);
if (identityRecord && identityRecord.publicKey) {
return equalArrayBuffers(identityRecord.publicKey, publicKey);
}
window.log.warn(
'isTrustedIdentity: No local record for our own identifier. Returning true.'
);
return true;
}
switch (direction) {