Skip to content

Commit

Permalink
bugfix: fixes Error: fn:search,error:Cannot read properties of undefi…
Browse files Browse the repository at this point in the history
…ned (reading 'toUpperCase') #172
  • Loading branch information
Guido Doumen committed Dec 4, 2024
1 parent ca7d50a commit 8a10e11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/list/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export class RouteListService extends IncyclistService {

private applyTitleFilter(filters: SearchFilter, routes: SummaryCardDisplayProps[]) {
if (filters.title?.length) {
routes = routes.filter(r => r.title.toUpperCase().includes(filters.title.toUpperCase()));
routes = routes.filter(r => r.title?.toUpperCase()?.includes(filters.title.toUpperCase()));
}
return routes;
}
Expand Down

0 comments on commit 8a10e11

Please sign in to comment.