diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 1f5c41f45560..6a16e88314b7 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -2255,18 +2255,6 @@ function clearPolicyRoomNameErrors(reportID: string) { }); } -/** - * @param reportID The reportID of the report. - */ -// eslint-disable-next-line rulesdir/no-negated-variables -function clearReportNotFoundErrors(reportID: string) { - Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, { - errorFields: { - notFound: null, - }, - }); -} - function setIsComposerFullSize(reportID: string, isComposerFullSize: boolean) { Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_IS_COMPOSER_FULL_SIZE}${reportID}`, isComposerFullSize); } @@ -3781,7 +3769,6 @@ export { toggleSubscribeToChildReport, updatePolicyRoomNameAndNavigate, clearPolicyRoomNameErrors, - clearReportNotFoundErrors, clearIOUError, subscribeToNewActionEvent, notifyNewAction, diff --git a/src/pages/home/ReportScreen.tsx b/src/pages/home/ReportScreen.tsx index 3f37663928ff..3076aeb87bd1 100644 --- a/src/pages/home/ReportScreen.tsx +++ b/src/pages/home/ReportScreen.tsx @@ -439,16 +439,6 @@ function ReportScreen({ Report.openReport(reportIDFromRoute, reportActionIDFromRoute); }, [reportIDFromRoute, reportActionIDFromRoute]); - useEffect(() => { - if (!report.reportID) { - return; - } - - if (report?.errorFields?.notFound) { - Report.clearReportNotFoundErrors(report.reportID); - } - }, [report?.errorFields?.notFound, report.reportID]); - useEffect(() => { if (!report.reportID || !isFocused) { return;