Skip to content

Commit

Permalink
get default value for personalDetails
Browse files Browse the repository at this point in the history
  • Loading branch information
suneox committed Apr 30, 2024
1 parent d299b32 commit 679e4de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/OptionListContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import usePrevious from '@hooks/usePrevious';
import * as OptionsListUtils from '@libs/OptionsListUtils';
import type {OptionList} from '@libs/OptionsListUtils';
import * as ReportUtils from '@libs/ReportUtils';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type {PersonalDetails, Report} from '@src/types/onyx';
import {usePersonalDetails} from './OnyxProvider';
Expand Down Expand Up @@ -50,7 +51,7 @@ function OptionsListContextProvider({reports, children}: OptionsListProviderProp
personalDetails: [],
});

const personalDetails = usePersonalDetails();
const personalDetails = usePersonalDetails() || CONST.EMPTY_OBJECT;
const prevPersonalDetails = usePrevious(personalDetails);
const prevReports = usePrevious(reports);

Expand Down

0 comments on commit 679e4de

Please sign in to comment.