File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ export class DiIndexData extends IndexData<DiData> {
2525 return this . getValues ( ) . flatMap ( data => data . virtualTypes ) ;
2626 }
2727
28- public findTypeByName ( name : string ) : DiType | undefined {
29- return this . getTypes ( ) . find ( type => type . name === name ) ;
28+ public findTypesByName ( name : string ) : DiType [ ] {
29+ return this . getTypes ( ) . filter ( type => type . name === name ) ;
3030 }
3131
3232 public findVirtualTypeByName ( name : string ) : DiVirtualType | undefined {
@@ -38,7 +38,8 @@ export class DiIndexData extends IndexData<DiData> {
3838 }
3939
4040 public findPluginsForType ( type : string ) : DiPlugin [ ] {
41- const typeData = this . findTypeByName ( type ) ;
42- return typeData ?. plugins || [ ] ;
41+ const typeData = this . findTypesByName ( type ) ;
42+
43+ return typeData . flatMap ( type => type . plugins ) ;
4344 }
4445}
You can’t perform that action at this time.
0 commit comments