Skip to content

Commit

Permalink
refactor(SavedTripScreen): Check that monitoredTrip is defined for re…
Browse files Browse the repository at this point in the history
…ad-only state
  • Loading branch information
binh-dam-ibigroup committed Nov 21, 2024
1 parent d7794a6 commit 0a112e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/components/user/monitored-trip/saved-trip-screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0a112e7

Please sign in to comment.