Skip to content

Commit 9eb58b1

Browse files
authored
Merge pull request Expensify#67443 from mkzie2/mkzie2-issue/67026
2 parents 94e8dcb + 6142a5d commit 9eb58b1

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/components/OptionListContextProvider.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, {createContext, useCallback, useContext, useEffect, useMemo, useRef, useState} from 'react';
2-
import type {OnyxCollection} from 'react-native-onyx';
2+
import type {OnyxCollection, OnyxEntry} from 'react-native-onyx';
33
import useOnyx from '@hooks/useOnyx';
44
import usePrevious from '@hooks/usePrevious';
55
import {createOptionFromReport, createOptionList, processReport, shallowOptionsListCompare} from '@libs/OptionsListUtils';
@@ -87,13 +87,11 @@ function OptionsListContextProvider({children}: OptionsListProviderProps) {
8787
}, [prevReportAttributesLocale, loadOptions, reportAttributes?.locale]);
8888

8989
const changedReportsEntries = useMemo(() => {
90-
const result: OnyxCollection<Report> = {};
90+
const result: OnyxCollection<OnyxEntry<Report>> = {};
9191

9292
Object.keys(changedReports ?? {}).forEach((key) => {
9393
const report = reports?.[key];
94-
if (report) {
95-
result[key] = report;
96-
}
94+
result[key] = report;
9795
});
9896
return result;
9997
}, [changedReports, reports]);

0 commit comments

Comments
 (0)