File tree Expand file tree Collapse file tree 1 file changed +1
-22
lines changed
app/routes/project-version/classes Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import { resolve, all } from 'rsvp';
3
3
import Route from '@ember/routing/route' ;
4
4
import { set } from '@ember/object' ;
5
5
6
- import { pluralize } from 'ember-inflector' ;
7
6
import getFullVersion from 'ember-api-docs/utils/get-full-version' ;
8
7
import createExcerpt from 'ember-api-docs/utils/create-excerpt' ;
9
8
@@ -60,27 +59,7 @@ export default class ClassRoute extends Route {
60
59
} ) ;
61
60
}
62
61
63
- redirect ( model , transition ) {
64
- const lookupParams = ( routeName ) => {
65
- let route = transition . routeInfos . find ( ( { name } ) => name === routeName ) ;
66
- return route ? route . params : { } ;
67
- } ;
68
-
69
- let {
70
- to : { queryParams } ,
71
- } = transition ;
72
-
73
- if ( queryParams . anchor && queryParams . type ) {
74
- let type = queryParams . type ;
75
- this . router . transitionTo (
76
- `project-version.classes.class.${ pluralize ( type ) } .${ type } ` ,
77
- lookupParams ( 'project-version' ) . project ,
78
- lookupParams ( 'project-version' ) . project_version ,
79
- lookupParams ( 'project-version.classes.class' ) . class ,
80
- queryParams . anchor
81
- ) ;
82
- }
83
-
62
+ redirect ( model ) {
84
63
if ( model . isError ) {
85
64
let error = new Error (
86
65
'Error retrieving model in routes/project-version/classes/class'
You can’t perform that action at this time.
0 commit comments