diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index 5e682dfb176f6..6afdba5348f96 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -2887,7 +2887,7 @@ function setUpDistanceTransaction() { */ function navigateToNextPage(iou, iouType, report, path = '') { const moneyRequestID = `${iouType}${report.reportID || ''}`; - const shouldReset = !_.isEmpty(report.reportID) && iou.id !== moneyRequestID; + const shouldReset = iou.id !== moneyRequestID; // 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 96212d6f5a01b..8b697cde4880d 100644 --- a/src/pages/iou/steps/MoneyRequestConfirmPage.js +++ b/src/pages/iou/steps/MoneyRequestConfirmPage.js @@ -122,7 +122,7 @@ function MoneyRequestConfirmPage(props) { // Reset the money request Onyx if the ID in Onyx does not match the ID from params const moneyRequestId = `${iouType.current}${reportID.current}`; - const shouldReset = !isDistanceRequest && props.iou.id !== moneyRequestId && !_.isEmpty(reportID.current); + const shouldReset = !isDistanceRequest && props.iou.id !== moneyRequestId; if (shouldReset) { IOU.resetMoneyRequestInfo(moneyRequestId); } diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js index 60d11547d12cf..4fff1cd310a3e 100644 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js @@ -80,7 +80,7 @@ function MoneyRequestParticipantsPage({iou, selectedTab, route}) { useEffect(() => { // ID in Onyx could change by initiating a new request in a separate browser tab or completing a request - if (prevMoneyRequestId.current !== iou.id && !_.isEmpty(reportID.current)) { + if (prevMoneyRequestId.current !== iou.id) { // The ID is cleared on completing a request. In that case, we will do nothing if (iou.id && !isDistanceRequest && !isSplitRequest) { navigateBack(true); @@ -90,7 +90,7 @@ function MoneyRequestParticipantsPage({iou, selectedTab, route}) { // Reset the money request Onyx if the ID in Onyx does not match the ID from params const moneyRequestId = `${iouType.current}${reportID.current}`; - const shouldReset = !_.isEmpty(reportID.current) && iou.id !== moneyRequestId; + const shouldReset = iou.id !== moneyRequestId; if (shouldReset) { IOU.resetMoneyRequestInfo(moneyRequestId); }