Skip to content

Commit 132cf83

Browse files
author
Konstantin Dinev
committed
fix(*): removing a warning from combo.common
1 parent 138834c commit 132cf83

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

projects/igniteui-angular/src/lib/combo/combo.common.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,6 @@ export abstract class IgxComboBaseDirective implements IgxComboBase, AfterViewCh
991991

992992
/** @hidden @internal */
993993
public ngOnInit() {
994-
995994
this.ngControl = this._injector.get<NgControl>(NgControl, null);
996995
this.selectionService.set(this.id, new Set());
997996
this._iconService?.addSvgIconFromText(caseSensitive.name, caseSensitive.value, 'imx-icons');
@@ -1096,8 +1095,8 @@ export abstract class IgxComboBaseDirective implements IgxComboBase, AfterViewCh
10961095
* ```
10971096
*/
10981097
public get selection(): any[] {
1099-
const items = Array.from(this.selectionService.get(this.id));
1100-
return this.convertKeysToItems(items);
1098+
const serviceRef = this.selectionService.get(this.id);
1099+
return serviceRef ? this.convertKeysToItems(Array.from(serviceRef)) : [];
11011100
}
11021101

11031102
/**

0 commit comments

Comments
 (0)