From 436b44d2d8003ef0f59a6f036dbf2466cc13f0ab Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Thu, 24 Feb 2022 01:01:05 +0200 Subject: [PATCH] Fix 500 error when match page 404's Closes #760 --- app/routes/play/match.$id.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/routes/play/match.$id.tsx b/app/routes/play/match.$id.tsx index 15bced672..a175fdba5 100644 --- a/app/routes/play/match.$id.tsx +++ b/app/routes/play/match.$id.tsx @@ -43,9 +43,13 @@ export const links: LinksFunction = () => { return [{ rel: "stylesheet", href: styles }]; }; -export const meta: MetaFunction = ({ data }: { data: LFGMatchLoaderData }) => { +export const meta: MetaFunction = ({ + data, +}: { + data: Nullable; +}) => { return { - title: data.isOwnMatch + title: data?.isOwnMatch ? makeTitle( `vs. ${listToUserReadableString( data.groups[1].members.map(