From 9194a00ba0f54fb8cae270de23d63b4aba0b19c5 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Thu, 21 Nov 2024 17:10:22 +0530 Subject: [PATCH] fix: Search - Website crashes after exploring expenses in search for some time. Signed-off-by: krishna2323 --- src/hooks/usePaginatedReportActions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/usePaginatedReportActions.ts b/src/hooks/usePaginatedReportActions.ts index 791b6c47d1a0..6e02248ca00a 100644 --- a/src/hooks/usePaginatedReportActions.ts +++ b/src/hooks/usePaginatedReportActions.ts @@ -12,7 +12,7 @@ function usePaginatedReportActions(reportID?: string, reportActionID?: string) { // Use `||` instead of `??` to handle empty string. // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing const reportIDWithDefault = reportID || '-1'; - const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`); + const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${reportIDWithDefault}`); const canUserPerformWriteAction = ReportUtils.canUserPerformWriteAction(report); const [sortedAllReportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportIDWithDefault}`, {