diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx index c81e5c6cfe8f..107e8e8108f6 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx @@ -50,7 +50,7 @@ function PolicyDistanceRateDetailsPage({policy, route}: PolicyDistanceRateDetail const currency = rate?.currency ?? CONST.CURRENCY.USD; // Rates can be disabled or deleted as long as in the remaining rates there is always at least one enabled rate and there are no pending delete action - const canDisableOrDeleteRate = Object.values(customUnit?.rates).some( + const canDisableOrDeleteRate = Object.values(customUnit?.rates ?? {}).some( (distanceRate: Rate) => distanceRate?.enabled && rateID !== distanceRate?.customUnitRateID && distanceRate?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE, ); const errorFields = rate?.errorFields;