Skip to content

Commit

Permalink
fix: don't crash if default bindlabel doesn't exist on item
Browse files Browse the repository at this point in the history
  • Loading branch information
varnastadeus committed Nov 26, 2017
1 parent 91e0740 commit 34b3d34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ng-select/items-list.ts
Expand Up @@ -134,7 +134,7 @@ export class ItemsList {

private getDefaultFilterFunc(term, bindLabel: string) {
return (val: NgOption) => {
return searchHelper.stripSpecialChars(val[bindLabel])
return searchHelper.stripSpecialChars(val[bindLabel] || '')
.toUpperCase()
.indexOf(searchHelper.stripSpecialChars(term).toUpperCase()) > -1;
};
Expand Down

0 comments on commit 34b3d34

Please sign in to comment.