Skip to content

Commit ce94cd4

Browse files
fix(SelectionList): correctly handle null values
1 parent 8653419 commit ce94cd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

terminus-ui/selection-list/src/selection-list.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ export class TsSelectionListComponent implements
653653
const controlValue = this.ngControl.value;
654654
// If the input value doesn't match the selection, then the user must have edited the input value
655655
// istanbul ignore else
656-
if (inputValue !== ((controlValue && controlValue.length > 0) ? this.displayFormatter(controlValue[0]) : '')) {
656+
if (controlValue && inputValue !== ((controlValue && controlValue.length > 0) ? this.displayFormatter(controlValue[0]) : '')) {
657657
this.ngControl.value.length = 0;
658658
}
659659
}

0 commit comments

Comments
 (0)