File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
src/lib/utils/options/sources Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -35,10 +35,9 @@ export class ComponentSource extends OptionsComponent {
3535 }
3636
3737 private removeComponent ( component : AbstractComponent < any > ) {
38- const name = component . componentName ;
39- let index = this . knownComponents . indexOf ( name ) ;
38+ let index = this . knownComponents . indexOf ( component . componentName ) ;
4039 if ( index !== - 1 ) {
41- this . knownComponents . slice ( index , 1 ) ;
40+ this . knownComponents . splice ( index , 1 ) ;
4241 for ( let declaration of component . getOptionDeclarations ( ) ) {
4342 this . owner . removeDeclarationByName ( declaration . name ) ;
4443 }
@@ -56,9 +55,6 @@ export class ComponentSource extends OptionsComponent {
5655 }
5756
5857 private onComponentRemoved ( e : ComponentEvent ) {
59- const declarations = e . component . getOptionDeclarations ( ) ;
60- for ( let declaration of declarations ) {
61- this . owner . removeDeclarationByName ( declaration . name ) ;
62- }
58+ this . removeComponent ( e . component ) ;
6359 }
6460}
You can’t perform that action at this time.
0 commit comments