From 0a112e7c0ec784b030b6ce593ea184f95f4bb0f3 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Thu, 21 Nov 2024 09:41:04 -0500 Subject: [PATCH] refactor(SavedTripScreen): Check that monitoredTrip is defined for read-only state --- lib/components/user/monitored-trip/saved-trip-screen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/user/monitored-trip/saved-trip-screen.js b/lib/components/user/monitored-trip/saved-trip-screen.js index ba71ed1cb..88c7d41b2 100644 --- a/lib/components/user/monitored-trip/saved-trip-screen.js +++ b/lib/components/user/monitored-trip/saved-trip-screen.js @@ -256,7 +256,7 @@ class SavedTripScreen extends Component { {...props} hasMobilityProfile={Boolean(loggedInUser.mobilityProfile)} isCreating={isCreating} - isReadOnly={monitoredTrip.userId !== loggedInUser.id} + isReadOnly={monitoredTrip?.userId !== loggedInUser.id} notificationChannel={loggedInUser.notificationChannel} onCancel={ isCreating ? this._goToTripPlanner : this._goToSavedTrips