File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
lib/broccoli/docs-compiler Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -52,12 +52,20 @@ module.exports = class NavigationIndexGenerator {
5252 return resolvedType || 'modules' ;
5353 }
5454
55- _resolvedTypeForModule ( module ) {
56- let [ , type ] = module . file . split ( '/' ) ;
55+ _resolvedTypeForModule ( module ) {
56+ let path = module . file . split ( '/' ) ;
5757
58- return RESOLVED_TYPES . includes ( type ) && type ;
58+ // By default we assume that the type is at index 1
59+ let type = path [ 1 ] ;
60+
61+ // If the module is a scoped package, then the type will be at index 2
62+ if ( path [ 0 ] . charAt ( 0 ) === '@' ) {
63+ type = path [ 2 ] ;
5964 }
6065
66+ return RESOLVED_TYPES . includes ( type ) && type ;
67+ }
68+
6169 _isResolvedType ( module ) {
6270 return this . _resolvedTypeForModule ( module ) ;
6371 }
You can’t perform that action at this time.
0 commit comments