From adbfc255609a6e3e05e8c9dfc48e4a552dbb8c48 Mon Sep 17 00:00:00 2001 From: rayane-djouah <77965000+rayane-djouah@users.noreply.github.com> Date: Thu, 11 Jan 2024 06:07:04 +0100 Subject: [PATCH] Fix app crashing on ios when route is undefined --- src/components/ConfirmedRoute.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ConfirmedRoute.tsx b/src/components/ConfirmedRoute.tsx index 05d6557a72e3..c01f7c6250f4 100644 --- a/src/components/ConfirmedRoute.tsx +++ b/src/components/ConfirmedRoute.tsx @@ -37,7 +37,7 @@ function ConfirmedRoute({mapboxAccessToken, transaction}: ConfirmedRouteProps) { const {isOffline} = useNetwork(); const {route0: route} = transaction.routes ?? {}; const waypoints = transaction.comment?.waypoints ?? {}; - const coordinates = route.geometry?.coordinates ?? []; + const coordinates = route?.geometry?.coordinates ?? []; const theme = useTheme(); const styles = useThemeStyles();