FIX: flagging topic was giving error message

This commit is contained in:
Arpit Jalan 2015-05-01 02:09:19 +05:30
parent 1b250f1e01
commit bb99bd8a03
1 changed files with 3 additions and 1 deletions

View File

@ -81,7 +81,9 @@ Discourse.ActionSummary = Discourse.Model.extend({
flag_topic: this.get('flagTopic') ? true : false flag_topic: this.get('flagTopic') ? true : false
} }
}).then(function(result) { }).then(function(result) {
if (!self.get('flagTopic')) {
return post.updateActionsSummary(result); return post.updateActionsSummary(result);
}
}).catch(function (error) { }).catch(function (error) {
self.removeAction(); self.removeAction();
var message = $.parseJSON(error.responseText).errors; var message = $.parseJSON(error.responseText).errors;