Skip to content

Commit 408e215

Browse files
committed
Bring back correct const and make 'unreportedExpenses' prop dependency more specific
1 parent 489584a commit 408e215

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/AddUnreportedExpense.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function AddUnreportedExpense({route}: AddUnreportedExpensePageType) {
7070
return [];
7171
}
7272
return Object.values(transactions || {}).filter((item) => {
73-
const isUnreported = true;
73+
const isUnreported = item?.reportID === CONST.REPORT.UNREPORTED_REPORT_ID || item?.reportID === '';
7474
if (!isUnreported) {
7575
return false;
7676
}
@@ -221,7 +221,7 @@ function AddUnreportedExpense({route}: AddUnreportedExpensePageType) {
221221
return translate('common.noResultsFound');
222222
}
223223
return '';
224-
}, [debouncedSearchValue, unreportedExpenses, translate]);
224+
}, [debouncedSearchValue, unreportedExpenses?.length, translate]);
225225

226226
const textInputOptions = useMemo(
227227
() => ({

0 commit comments

Comments
 (0)