Skip to content

Commit

Permalink
Improve undefined handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdaley committed Sep 26, 2023
1 parent 179d01b commit 89f1f40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/app/components/x/dropdown-list/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,10 @@ export default class XDropdownListComponent extends Component<XDropdownListCompo
shownItems[key] = value;
} else if (this.args.secondaryFilterAttribute) {
const maybeValue = (value as any)[this.args.secondaryFilterAttribute];
if (maybeValue.toLowerCase().includes(this.query.toLowerCase())) {
if (
maybeValue &&
maybeValue.toLowerCase().includes(this.query.toLowerCase())
) {
shownItems[key] = value;
}
}
Expand Down

0 comments on commit 89f1f40

Please sign in to comment.