Skip to content

Commit 388f844

Browse files
committed
Fixed test (second attempt)
1 parent ad307b8 commit 388f844

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/dropdown/list/dropdown-list.component.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -445,13 +445,9 @@ export class DropdownList implements AbstractDropdownView, AfterViewInit, OnDest
445445
console.error(`${this.constructor.name}.propagateSelected expects an Array<ListItem>, got ${JSON.stringify(value)}`);
446446
}
447447
this.onItemsReady(() => {
448-
if (this.getListItems().length === 0) {
449-
return;
450-
}
451-
452448
const selectedNewItems = [];
453449
for (let newItem of value) {
454-
if (newItem.selected) {
450+
if (newItem && newItem.selected) {
455451
// copy the item
456452
let tempNewItem: string | ListItem = Object.assign({}, newItem);
457453
// deleted selected because it's what we _want_ to change

0 commit comments

Comments
 (0)