Skip to content

Commit

Permalink
Merge pull request #49258 from nkdengineer/fix/49249
Browse files Browse the repository at this point in the history
fix: app crash when we save the user search value and reset the app
  • Loading branch information
lakchote authored Sep 16, 2024
2 parents 19d037b + 32542ba commit 230cbd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/SearchUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ function getPolicyIDFromSearchQuery(queryJSON: SearchQueryJSON) {

function getDisplayValue(filterName: string, filter: string, personalDetails: OnyxTypes.PersonalDetailsList, cardList: OnyxTypes.CardList, reports: OnyxCollection<OnyxTypes.Report>) {
if (filterName === CONST.SEARCH.SYNTAX_FILTER_KEYS.FROM || filterName === CONST.SEARCH.SYNTAX_FILTER_KEYS.TO) {
return PersonalDetailsUtils.createDisplayName(personalDetails[filter]?.login ?? '', personalDetails[filter]);
return PersonalDetailsUtils.createDisplayName(personalDetails?.[filter]?.login ?? '', personalDetails?.[filter]);
}
if (filterName === CONST.SEARCH.SYNTAX_FILTER_KEYS.CARD_ID) {
return cardList[filter].bank;
Expand Down

0 comments on commit 230cbd6

Please sign in to comment.