From fd337b9194e77b77d7a49fbfdb8bfc5003a8bab8 Mon Sep 17 00:00:00 2001 From: tienifr Date: Fri, 12 Apr 2024 10:27:17 +0700 Subject: [PATCH] lint fix --- src/pages/home/ReportScreen.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/home/ReportScreen.tsx b/src/pages/home/ReportScreen.tsx index 3bf2392eb444..68f984d31414 100644 --- a/src/pages/home/ReportScreen.tsx +++ b/src/pages/home/ReportScreen.tsx @@ -335,10 +335,11 @@ function ReportScreen({ const transactionThreadReportID = useMemo(() => ReportActionsUtils.getOneTransactionThreadReportID(report.reportID, reportActions ?? []), [report.reportID, reportActions]); useEffect(() => { - if (transactionThreadReportID && route.params.reportActionID) { - Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(route.params.reportID)); + if (!transactionThreadReportID || !route.params.reportActionID) { + return; } - }, [transactionThreadReportID]); + Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(route.params.reportID)); + }, [transactionThreadReportID, route.params.reportActionID, route.params.reportID]); if (ReportUtils.isMoneyRequestReport(report)) { headerView = (