Fix: Service without a name breaks homepage when using quicklaunch

Signed-off-by: Denis Papec <denis.papec@gmail.com>
This commit is contained in:
Denis Papec 2023-10-05 19:22:25 +01:00
parent 76cbb6e2ed
commit f55ba25e57
No known key found for this signature in database
GPG Key ID: DE0912C69A47222C

View File

@ -84,7 +84,7 @@ export default function QuickLaunch({servicesAndBookmarks, searchString, setSear
if (searchString.length === 0) setResults([]);
else {
let newResults = servicesAndBookmarks.filter(r => {
const nameMatch = r.name.toLowerCase().includes(searchString);
const nameMatch = r?.name?.toLowerCase()?.includes(searchString);
let descriptionMatch;
if (searchDescriptions) {
descriptionMatch = r.description?.toLowerCase().includes(searchString)