File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed
Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,17 @@ export default {
3030 methods : [ ] ,
3131 } ;
3232
33+ const propertiesToCopy = [
34+ 'miscs' ,
35+ 'modules' ,
36+ 'classes' ,
37+ 'globals' ,
38+ 'methods' ,
39+ ] ;
40+
3341 for ( const section of input ) {
3442 // Copy the relevant properties from each section into our output
35- for ( const property of [
36- 'miscs' ,
37- 'modules' ,
38- 'classes' ,
39- 'globals' ,
40- 'methods' ,
41- ] ) {
43+ for ( const property of propertiesToCopy ) {
4244 if ( section [ property ] ) {
4345 generatedValue [ property ] . push ( ...section [ property ] ) ;
4446 }
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ export function buildHierarchy(entries) {
4141
4242 previousEntry . hierarchyChildren . push ( entry ) ;
4343 } else {
44+ if ( i < 2 ) {
45+ throw new Error ( `can't find parent since i < 2 (${ i } )` ) ;
46+ }
47+
4448 // Loop to find the entry we're a child of
4549 for ( let j = i - 2 ; j >= 0 ; j -- ) {
4650 const jEntry = entries [ j ] ;
You can’t perform that action at this time.
0 commit comments