FIX: Redirecting breaks the back button.
This commit is contained in:
parent
f281f6e026
commit
8772ba2f80
|
@ -10,6 +10,7 @@ export default {
|
|||
app.DiscoveryCategoryController = DiscoverySortableController.extend();
|
||||
app.DiscoveryParentCategoryController = DiscoverySortableController.extend();
|
||||
app.DiscoveryCategoryNoneController = DiscoverySortableController.extend();
|
||||
app.DiscoveryCategoryWithIDController = DiscoverySortableController.extend();
|
||||
|
||||
app.DiscoveryCategoryRoute = buildCategoryRoute('latest');
|
||||
app.DiscoveryParentCategoryRoute = buildCategoryRoute('latest');
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
import Category from 'discourse/models/category';
|
||||
|
||||
export default Discourse.Route.extend({
|
||||
model: function(params) {
|
||||
return Category.findById(params.id);
|
||||
},
|
||||
|
||||
redirect: function(model) {
|
||||
this.transitionTo(`/c/${Category.slugFor(model)}`);
|
||||
export default Discourse.DiscoveryCategoryRoute.extend({
|
||||
model(params) {
|
||||
return { category: Category.findById(params.id) };
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue