diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index d9de984ad12c..e0af6574a001 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -2918,7 +2918,7 @@ function setUpDistanceTransaction() { */ function navigateToNextPage(iou, iouType, report, path = '') { const moneyRequestID = `${iouType}${report.reportID || ''}`; - const shouldReset = iou.id !== moneyRequestID; + const shouldReset = iou.id !== moneyRequestID && !_.isEmpty(report.reportID); // If the money request ID in Onyx does not match the ID from params, we want to start a new request // with the ID from params. We need to clear the participants in case the new request is initiated from FAB. diff --git a/src/pages/iou/steps/MoneyRequestConfirmPage.js b/src/pages/iou/steps/MoneyRequestConfirmPage.js index 44995e6ec3d8..57289d6c8d94 100644 --- a/src/pages/iou/steps/MoneyRequestConfirmPage.js +++ b/src/pages/iou/steps/MoneyRequestConfirmPage.js @@ -118,7 +118,7 @@ function MoneyRequestConfirmPage(props) { // Reset the money request Onyx if the ID in Onyx does not match the ID from params const moneyRequestId = `${iouType}${reportID}`; - const shouldReset = !isDistanceRequest && props.iou.id !== moneyRequestId; + const shouldReset = !isDistanceRequest && props.iou.id !== moneyRequestId && !_.isEmpty(reportID); if (shouldReset) { IOU.resetMoneyRequestInfo(moneyRequestId); } diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js index 9a114de98ea7..d0982e6296db 100644 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js @@ -1,3 +1,4 @@ +import _ from 'lodash'; import lodashGet from 'lodash/get'; import lodashSize from 'lodash/size'; import PropTypes from 'prop-types'; @@ -111,7 +112,7 @@ function MoneyRequestParticipantsPage({iou, selectedTab, route, transaction}) { // Reset the money request Onyx if the ID in Onyx does not match the ID from params const moneyRequestId = `${iouType}${reportID}`; - const shouldReset = iou.id !== moneyRequestId; + const shouldReset = iou.id !== moneyRequestId && !_.isEmpty(reportID); if (shouldReset) { IOU.resetMoneyRequestInfo(moneyRequestId); }