Skip to content

Commit

Permalink
fix(SelectionList): correctly handle null values
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincharity committed Oct 3, 2019
1 parent 8653419 commit ce94cd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terminus-ui/selection-list/src/selection-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ export class TsSelectionListComponent implements
const controlValue = this.ngControl.value;
// If the input value doesn't match the selection, then the user must have edited the input value
// istanbul ignore else
if (inputValue !== ((controlValue && controlValue.length > 0) ? this.displayFormatter(controlValue[0]) : '')) {
if (controlValue && inputValue !== ((controlValue && controlValue.length > 0) ? this.displayFormatter(controlValue[0]) : '')) {
this.ngControl.value.length = 0;
}
}
Expand Down

0 comments on commit ce94cd4

Please sign in to comment.