Skip to content

Commit

Permalink
fix(autocomplete): handle null and undefined values (#2814)
Browse files Browse the repository at this point in the history
  • Loading branch information
chirichok98 committed Aug 25, 2021
1 parent a3b5ae5 commit 7753027
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,7 @@ export class NbAutocompleteDirective<T> implements OnDestroy, AfterViewInit, Con
}

protected handleInputValueUpdate(value: T) {
if (value === undefined || value === null) {
return;
}
this.setHostInputValue(value);
this.setHostInputValue(value ?? '');
this._onChange(value);
if (this.focusInputOnValueChange) {
this.hostRef.nativeElement.focus();
Expand Down

0 comments on commit 7753027

Please sign in to comment.