Save single errors returned from send functions

// FREEBIE
This commit is contained in:
lilia 2015-12-04 12:02:19 -08:00
parent 2f469835d9
commit 0620f08a7c

View file

@ -153,10 +153,16 @@
this.set({dataMessage: result.dataMessage});
}
this.set({sent: true});
this.saveErrors(result.errors);
if (result.successfulNumbers.length > 0) {
this.sendSyncMessage();
if (result instanceof Error) {
this.saveErrors(result);
} else {
this.saveErrors(result.errors);
if (result.successfulNumbers.length > 0) {
this.sendSyncMessage();
}
}
}.bind(this));
},