From 569d0655faf55754b59876018a942b4666262c5e Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 30 Sep 2015 19:32:25 -0700 Subject: [PATCH] Fix test failure // FREEBIE --- js/models/messages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/models/messages.js b/js/models/messages.js index f443e4e562b6..c31c40484c8f 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -142,7 +142,6 @@ return promise.then(function() { this.save({sent: true}); }.bind(this)).catch(function(errors) { - this.save({sent: true}); if (!(errors instanceof Array)) { errors = [errors]; } @@ -151,6 +150,7 @@ console.log(e.reason, e.stack); }); this.save({ + sent: true, errors : errors.map(function(e) { if (e.constructor === Error) { return _.pick(e, 'name', 'message', 'code', 'number', 'reason');