Skip to content

Commit 95ea3bb

Browse files
committed
fix: show correct feed name in search query
1 parent 9ba7cfa commit 95ea3bb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/libs/SearchQueryUtils.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -793,14 +793,15 @@ function buildUserReadableQueryString(
793793
const cardFeedsForDisplay = getCardFeedsForDisplay(cardFeeds, cardList);
794794
const plaidFeedName = feedKey?.split(CONST.BANK_ACCOUNT.SETUP_TYPE.PLAID)?.at(1);
795795
const regularBank = feedKey?.split('_')?.at(1) ?? CONST.DEFAULT_NUMBER_ID;
796-
const plaidValue = cardFeedsForDisplay[`${CONST.BANK_ACCOUNT.SETUP_TYPE.PLAID}${plaidFeedName}` as OnyxTypes.CompanyCardFeed]?.name;
796+
const idPrefix = feedKey?.split('_')?.at(0) ?? CONST.DEFAULT_NUMBER_ID;
797+
const plaidValue = cardFeedsForDisplay[`${idPrefix}_${CONST.BANK_ACCOUNT.SETUP_TYPE.PLAID}${plaidFeedName}` as OnyxTypes.CompanyCardFeed]?.name;
797798
if (plaidFeedName) {
798799
if (plaidValue) {
799800
acc.push({operator: filter.operator, value: plaidValue});
800801
}
801802
return acc;
802803
}
803-
const value = cardFeedsForDisplay[regularBank as OnyxTypes.CompanyCardFeed]?.name ?? feedKey;
804+
const value = cardFeedsForDisplay[`${idPrefix}_${regularBank}` as OnyxTypes.CompanyCardFeed]?.name ?? feedKey;
804805
acc.push({operator: filter.operator, value});
805806

806807
return acc;

0 commit comments

Comments
 (0)