File tree 1 file changed +11
-2
lines changed
src/dashboard/Data/Browser
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,8 @@ export default class Browser extends DashboardView {
176
176
177
177
redirectToFirstClass ( classList ) {
178
178
if ( ! classList . isEmpty ( ) ) {
179
- let classes = Object . keys ( classList . toObject ( ) ) ;
179
+ classList = Object . keys ( classList . toObject ( ) ) ;
180
+ let classes = classList . filter ( className => className !== '_Role' && className !== '_User' && className !== '_Installation' ) ;
180
181
classes . sort ( ( a , b ) => {
181
182
if ( a [ 0 ] === '_' && b [ 0 ] !== '_' ) {
182
183
return - 1 ;
@@ -186,7 +187,15 @@ export default class Browser extends DashboardView {
186
187
}
187
188
return a . toUpperCase ( ) < b . toUpperCase ( ) ? - 1 : 1 ;
188
189
} ) ;
189
- history . replace ( this . context . generatePath ( 'browser/' + classes [ 0 ] ) ) ;
190
+ if ( classes [ 0 ] ) {
191
+ history . replace ( this . context . generatePath ( `browser/${ classes [ 0 ] } ` ) ) ;
192
+ } else {
193
+ if ( classList . indexOf ( '_User' ) !== - 1 ) {
194
+ history . replace ( this . context . generatePath ( 'browser/_User' ) ) ;
195
+ } else {
196
+ history . replace ( this . context . generatePath ( `browser/${ classList [ 0 ] } ` ) ) ;
197
+ }
198
+ }
190
199
}
191
200
}
192
201
You can’t perform that action at this time.
0 commit comments