FIX: clear draft when creating a new topic

This commit is contained in:
Arpit Jalan 2015-11-19 23:14:43 +05:30
parent 7737ea89b1
commit 711a7a146c

View File

@ -275,8 +275,8 @@ export default Ember.Controller.extend({
return result;
}
// If we replied as a new topic successfully, remove the draft.
if (self.get('replyAsNewTopicDraft')) {
// If user "created a new topic/post" or "replied as a new topic" successfully, remove the draft.
if (result.responseJson.action === "create_post" || self.get('replyAsNewTopicDraft')) {
self.destroyDraft();
}