From 88cacedd042a5f199ef929841fb103c2c0112449 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 10 Dec 2024 13:21:30 -0700 Subject: [PATCH] fix ts --- src/libs/actions/Search.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/Search.ts b/src/libs/actions/Search.ts index 834289994460..65e5cfe62c63 100644 --- a/src/libs/actions/Search.ts +++ b/src/libs/actions/Search.ts @@ -67,7 +67,7 @@ function handleActionButtonPress(hash: number, item: TransactionListItemType | R approveMoneyRequestOnSearch(hash, [item.reportID], transactionID); return; case CONST.SEARCH.ACTION_TYPES.SUBMIT: { - const policy = data[`${ONYXKEYS.COLLECTION.POLICY}${item.policyID}`]; + const policy = (allSnapshots?.[`${ONYXKEYS.COLLECTION.SNAPSHOT}${hash}`]?.data?.[`${ONYXKEYS.COLLECTION.POLICY}${item.policyID}`] ?? {}) as SearchPolicy; submitMoneyRequestOnSearch(hash, [item], [policy], transactionID); return; }