FIX: exceptions raised when editing replies were not displaying their error messages

This commit is contained in:
Neil Lalonde 2018-07-19 18:14:08 -04:00
parent 8893ca6238
commit dbcf4e2474

View File

@ -762,15 +762,10 @@ const Composer = RestModel.extend({
.then(() => { .then(() => {
// rest model only sets props after it is saved // rest model only sets props after it is saved
post.set("cooked", props.cooked); post.set("cooked", props.cooked);
return post return post.save(props).then(result => {
.save(props) this.clearState();
.then(result => { return result;
this.clearState(); });
return result;
})
.catch(error => {
throw new Error(error);
});
}) })
.catch(rollback); .catch(rollback);
}, },