File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -90,13 +90,18 @@ export const useSidebarItems = (sidebarName: string = DefaultSidebars.IN_CLUSTER
9090 ] ,
9191 } ) ;
9292 } else {
93- const entryGroup = entriesGroup . get ( group ) ! ;
94- entryGroup . subList ?. push ( {
95- name : item . jsonData . metadata . name ,
96- label : item . jsonData . spec . names . kind ,
97- isCR : true ,
98- } ) ;
99- //entryGroup.subList =
93+ const entryGroup = entriesGroup . get ( group ) ;
94+ if ( entryGroup ?. subList ) {
95+ const crdName = item . jsonData . metadata . name ;
96+
97+ if ( ! entryGroup . subList . some ( subItem => subItem . name === crdName ) ) {
98+ entryGroup . subList . push ( {
99+ name : crdName ,
100+ label : item . jsonData . spec . names . kind ,
101+ isCR : true ,
102+ } ) ;
103+ }
104+ }
100105 }
101106 } ) ;
102107 entriesGroup . forEach ( item => {
You can’t perform that action at this time.
0 commit comments