Skip to content

Commit c0beddb

Browse files
lukasz-madejlukasz-madejvalorkindaniloff200
authored
fix(typeahead): need to check if _matches is not undefined in the blur handler (#6028)
fix(typeahead): need to check if `_matches` is not undefined in the `blur` handler (#6028) Co-authored-by: lukasz-madej <[email protected]> Co-authored-by: Dmitriy Shekhovtsov <[email protected]> Co-authored-by: Dmitriy Danilov <[email protected]>
1 parent b6bb985 commit c0beddb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/typeahead/typeahead.directive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,10 @@ export class TypeaheadDirective implements OnInit, OnDestroy {
322322
this.typeaheadOnBlur.emit(this._container.active);
323323
}
324324

325-
if (!this.container && this._matches.length === 0) {
325+
if (!this.container && this._matches?.length === 0) {
326326
this.typeaheadOnBlur.emit(new TypeaheadMatch(
327327
this.element.nativeElement.value,
328-
this.element.nativeElement.value,
328+
this.element.nativeElement.value,
329329
false));
330330
}
331331
}

0 commit comments

Comments
 (0)