FIX: Double load if left a topic and came back into it.
This commit is contained in:
parent
b0695a2fc6
commit
8fa109638b
|
@ -155,10 +155,7 @@ const TopicRoute = Discourse.Route.extend(ShowFooter, {
|
||||||
let topic = this.modelFor('topic');
|
let topic = this.modelFor('topic');
|
||||||
if (topic && (topic.get('id') === parseInt(params.id, 10))) {
|
if (topic && (topic.get('id') === parseInt(params.id, 10))) {
|
||||||
this.setupParams(topic, queryParams);
|
this.setupParams(topic, queryParams);
|
||||||
// If we have the existing model, refresh it
|
return topic;
|
||||||
return topic.get('postStream').refresh().then(function() {
|
|
||||||
return topic;
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
topic = this.store.createRecord('topic', _.omit(params, 'username_filters', 'filter'));
|
topic = this.store.createRecord('topic', _.omit(params, 'username_filters', 'filter'));
|
||||||
return this.setupParams(topic, queryParams);
|
return this.setupParams(topic, queryParams);
|
||||||
|
|
Loading…
Reference in New Issue