FIX: Make sure we decrease post count if new post fails to save.
This commit is contained in:
parent
55865024c7
commit
531d649a75
|
@ -686,6 +686,10 @@ const Composer = RestModel.extend({
|
|||
}).catch(throwAjaxError(function() {
|
||||
if (postStream) {
|
||||
postStream.undoPost(createdPost);
|
||||
|
||||
if (post) {
|
||||
post.set('reply_count', post.get('reply_count') - 1);
|
||||
}
|
||||
}
|
||||
Ember.run.next(() => composer.set('composeState', OPEN));
|
||||
}));
|
||||
|
|
Loading…
Reference in New Issue