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
(cherry picked from commit 230cbd6)

(CP triggered by mountiny)
  • Loading branch information
lakchote authored and OSBotify committed Sep 16, 2024
1 parent c4cc7b8 commit 6afd006
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 6afd006

Please sign in to comment.