Skip to content

Commit 2b321fc

Browse files
Apply suggestions from code review
1 parent 9016217 commit 2b321fc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/pages/iou/request/step/IOURequestStepParticipants.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function IOURequestStepParticipants({
211211
// If not moving the transaction from track expense, select the default rate automatically.
212212
// Otherwise, keep the original p2p rate and let the user manually change it to the one they want from the workspace.
213213
const isPolicyExpenseChat = !!firstParticipant?.isPolicyExpenseChat;
214-
const policy = isPolicyExpenseChat ? allPolicies?.[firstParticipant?.policyID ?? ''] : undefined;
214+
const policy = isPolicyExpenseChat && firstParticipant?.policyID ? allPolicies?.[firstParticipant.policyID] : undefined;
215215
const rateID = DistanceRequestUtils.getCustomUnitRateID({reportID: firstParticipantReportID, isPolicyExpenseChat, policy, lastSelectedDistanceRates});
216216
transactions.forEach((transaction) => {
217217
setCustomUnitRateID(transaction.transactionID, rateID);

0 commit comments

Comments
 (0)