libsignal-protocol: Protect against null thrown Errors
This commit is contained in:
parent
009c58749b
commit
e4f18f9daa
1 changed files with 5 additions and 1 deletions
|
@ -36155,7 +36155,11 @@ SessionCipher.prototype = {
|
|||
// using each one at a time. Stop and return the result if we get
|
||||
// a valid result
|
||||
if (sessionList.length === 0) {
|
||||
return Promise.reject(errors[0]);
|
||||
var error = errors[0];
|
||||
if (!error) {
|
||||
error = new Error('decryptWithSessionList: list is empty, but no errors in array');
|
||||
}
|
||||
return Promise.reject(error);
|
||||
}
|
||||
|
||||
var session = sessionList.pop();
|
||||
|
|
Loading…
Reference in a new issue