From ca3e55a87dabb182511109ecdeb69a239119a467 Mon Sep 17 00:00:00 2001 From: Georgia Monahan <38015950+grgia@users.noreply.github.com> Date: Thu, 11 Jan 2024 17:49:25 -0800 Subject: [PATCH] Merge pull request #34336 from rayane-djouah/Migrate-ConfirmedRoute.js-component-to-TypeScript Fix app crashing on main when route is undefined during Distance Money Request creation (cherry picked from commit b5bfa470c0e2326748560bc5b1795090a76cea9d) --- 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();