Skip to content

Commit 5aeb21d

Browse files
committed
fix iou type and chat report ID on going back in amount selection
1 parent e3d9aae commit 5aeb21d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,9 @@ function IOURequestStepAmount({
326326

327327
// Preserve user's participant selection to avoid forcing them back to default workspace.
328328
const iouReportID = transaction?.reportID;
329-
const selectedReport = iouReportID ? getReportOrDraftReport(iouReportID) : null;
329+
const selectedReport = iouReportID === CONST.REPORT.UNREPORTED_REPORT_ID ? selfDMReport : getReportOrDraftReport(iouReportID);
330330
const navigationIOUType = isSelfDM(selectedReport) ? CONST.IOU.TYPE.TRACK : CONST.IOU.TYPE.SUBMIT;
331-
const chatReportID = selectedReport?.chatReportID ?? iouReportID;
331+
const chatReportID = selectedReport?.chatReportID ?? selectedReport?.reportID;
332332

333333
Navigation.setNavigationActionToMicrotaskQueue(() => {
334334
Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.getRoute(CONST.IOU.ACTION.CREATE, navigationIOUType, transactionID, chatReportID));

0 commit comments

Comments
 (0)