mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 04:33:45 +08:00
FIX: Forward button would break on some topics
This commit is contained in:
parent
1403d303b6
commit
145b2931c6
|
@ -87,6 +87,10 @@ Discourse.TopicRoute = Discourse.Route.extend({
|
|||
model: function(params) {
|
||||
var currentModel = this.modelFor('topic');
|
||||
if (currentModel && (currentModel.get('id') === parseInt(params.id, 10))) {
|
||||
// If we've recovered the currentModel (for example, hitting the forward button and we
|
||||
// popped it off the state), get rid of the `loaded` attribute we set when the back
|
||||
// button was hit.
|
||||
currentModel.set('postStream.loaded', true);
|
||||
return currentModel;
|
||||
}
|
||||
return Discourse.Topic.create(params);
|
||||
|
|
Loading…
Reference in New Issue
Block a user