Handle single-error rejections when sending messages

We can not assume that we will get back an error array.

Closes #258 // FREEBIE
pull/749/head
lilia 10 years ago
parent 6e1a41e9cf
commit 363c436b33

@ -100,6 +100,9 @@
message.unset('pending');
message.save();
}.bind(this)).catch(function(errors) {
if (errors instanceof Error) {
errors = [errors];
}
var keyErrors = [];
_.each(errors, function(e) {
if (e.error.name === 'OutgoingIdentityKeyError') {

Loading…
Cancel
Save