FIX: Double load if left a topic and came back into it.

This commit is contained in:
Robin Ward 2015-05-13 16:53:49 -04:00
parent b0695a2fc6
commit 8fa109638b
1 changed files with 1 additions and 4 deletions

View File

@ -155,10 +155,7 @@ const TopicRoute = Discourse.Route.extend(ShowFooter, {
let topic = this.modelFor('topic');
if (topic && (topic.get('id') === parseInt(params.id, 10))) {
this.setupParams(topic, queryParams);
// If we have the existing model, refresh it
return topic.get('postStream').refresh().then(function() {
return topic;
});
} else {
topic = this.store.createRecord('topic', _.omit(params, 'username_filters', 'filter'));
return this.setupParams(topic, queryParams);