diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index 1e27f722b456..9d2d7e4ada75 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -49,6 +49,7 @@ import ConfirmModal from '@src/components/ConfirmModal'; import CONST from '@src/CONST'; import type {TranslationPaths} from '@src/languages/types'; import ONYXKEYS from '@src/ONYXKEYS'; +import type {Route} from '@src/ROUTES'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import type * as OnyxTypes from '@src/types/onyx'; @@ -838,7 +839,7 @@ function ReportDetailsPage({policies, report, route, reportMetadata}: ReportDeta urlToNavigateBack = Task.getNavigationUrlOnTaskDelete(report); if (urlToNavigateBack) { Report.setDeleteTransactionNavigateBackUrl(urlToNavigateBack); - Navigation.goBack(urlToNavigateBack); + Navigation.goBack(urlToNavigateBack as Route); } else { Navigation.dismissModal(); } @@ -860,7 +861,7 @@ function ReportDetailsPage({policies, report, route, reportMetadata}: ReportDeta Navigation.dismissModal(); } else { Report.setDeleteTransactionNavigateBackUrl(urlToNavigateBack); - ReportUtils.navigateBackOnDeleteTransaction(urlToNavigateBack, true); + ReportUtils.navigateBackOnDeleteTransaction(urlToNavigateBack as Route, true); } }, [caseID, iouTransactionID, moneyRequestReport?.reportID, report, requestParentReportAction, isSingleTransactionView, isTransactionDeleted]);