File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ export const state = {
55 host : '' ,
66 scheme : '' ,
77 info : null ,
8- paths : [ ] ,
8+ paths : null ,
99 groups : null ,
10- tags : [ ]
10+ tags : null
1111}
1212
1313export const getters = {
@@ -20,16 +20,18 @@ export const getters = {
2020 groupedPaths : getters => {
2121 const grouped = [ ]
2222
23- getters . tags . forEach ( tag => {
24- const group = getters . groups . find ( group => group === tag . name )
23+ if ( getters . groups ) {
24+ getters . groups . forEach ( group => {
25+ const tag = getters . tags . find ( tag => tag . name === group )
2526
26- grouped . push ( {
27- name : tag . name ,
28- description : tag . description || null ,
29- deprecated : tag . deprecated || false ,
30- paths : getters . paths . filter ( path => path . group === group )
27+ grouped . push ( {
28+ name : group ,
29+ description : tag ? tag . description : null ,
30+ deprecated : tag ? tag . deprecated : false ,
31+ paths : getters . paths . filter ( path => path . group === group )
32+ } )
3133 } )
32- } )
34+ }
3335
3436 return grouped
3537 }
You can’t perform that action at this time.
0 commit comments