From 71d7a96fd14726b6aaf5425f1080cd1bdaf32aa3 Mon Sep 17 00:00:00 2001 From: James Kiesel Date: Tue, 1 Dec 2015 21:34:26 +0800 Subject: [PATCH] Allow compat with ActionSummary for topic model --- app/assets/javascripts/discourse/models/topic.js.es6 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/models/topic.js.es6 b/app/assets/javascripts/discourse/models/topic.js.es6 index 9fc50d38dff..e3e651aa8d7 100644 --- a/app/assets/javascripts/discourse/models/topic.js.es6 +++ b/app/assets/javascripts/discourse/models/topic.js.es6 @@ -3,6 +3,7 @@ import RestModel from 'discourse/models/rest'; import { propertyEqual } from 'discourse/lib/computed'; import { longDate } from 'discourse/lib/formatter'; import computed from 'ember-addons/ember-computed-decorators'; +import ActionSummary from 'discourse/models/action-summary'; const Topic = RestModel.extend({ message: null, @@ -415,7 +416,7 @@ Topic.reopenClass({ result.actions_summary = result.actions_summary.map(function(a) { a.post = result; a.actionType = Discourse.Site.current().postActionTypeById(a.id); - const actionSummary = Discourse.ActionSummary.create(a); + const actionSummary = ActionSummary.create(a); lookup.set(a.actionType.get('name_key'), actionSummary); return actionSummary; });