Be resilient to null thrown errors so we can surface to user
This commit is contained in:
parent
c54ba8d1fa
commit
f5852bb357
2 changed files with 5 additions and 4 deletions
|
@ -503,7 +503,7 @@ MessageReceiver.prototype.extend({
|
|||
.catch(error => {
|
||||
let errorToThrow = error;
|
||||
|
||||
if (error.message === 'Unknown identity key') {
|
||||
if (error && error.message === 'Unknown identity key') {
|
||||
// create an error that the UI will pick up and ask the
|
||||
// user if they want to re-negotiate
|
||||
const buffer = dcodeIO.ByteBuffer.wrap(ciphertext);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue