From 8a10e11b4896d54dd66bf776392f59588a9af50e Mon Sep 17 00:00:00 2001 From: Guido Doumen Date: Wed, 4 Dec 2024 11:41:46 +0100 Subject: [PATCH] bugfix: fixes Error: fn:search,error:Cannot read properties of undefined (reading 'toUpperCase') #172 --- src/routes/list/service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/list/service.ts b/src/routes/list/service.ts index 24e02ec..568893d 100644 --- a/src/routes/list/service.ts +++ b/src/routes/list/service.ts @@ -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; }