mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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() {
|
}).catch(throwAjaxError(function() {
|
||||||
if (postStream) {
|
if (postStream) {
|
||||||
postStream.undoPost(createdPost);
|
postStream.undoPost(createdPost);
|
||||||
|
|
||||||
|
if (post) {
|
||||||
|
post.set('reply_count', post.get('reply_count') - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Ember.run.next(() => composer.set('composeState', OPEN));
|
Ember.run.next(() => composer.set('composeState', OPEN));
|
||||||
}));
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user