FIX: error messages missing if topic edit failed in composer
This commit is contained in:
parent
ccc943c118
commit
b3297d0d62
|
@ -493,15 +493,17 @@ const Composer = RestModel.extend({
|
|||
|
||||
this.set('composeState', CLOSED);
|
||||
|
||||
var rollback = throwAjaxError(function(){
|
||||
post.set('cooked', oldCooked);
|
||||
self.set('composeState', OPEN);
|
||||
});
|
||||
|
||||
return promise.then(function() {
|
||||
return post.save(props).then(function(result) {
|
||||
self.clearState();
|
||||
return result;
|
||||
}).catch(throwAjaxError(function() {
|
||||
post.set('cooked', oldCooked);
|
||||
self.set('composeState', OPEN);
|
||||
}));
|
||||
});
|
||||
}).catch(rollback);
|
||||
}).catch(rollback);
|
||||
},
|
||||
|
||||
serialize(serializer, dest) {
|
||||
|
|
Loading…
Reference in New Issue