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