Skip to content

Commit

Permalink
Filter out unexisting options from "Recents"
Browse files Browse the repository at this point in the history
  • Loading branch information
aldo-expensify committed Mar 25, 2024
1 parent 4caf61a commit cd7d814
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/EditReportFieldDropdownPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function EditReportFieldDropdownPage({fieldName, onSubmit, fieldKey, fieldValue,
});
}

const filteredRecentlyUsedOptions = recentlyUsedOptions.filter((option) => option !== selectedValue);
const filteredRecentlyUsedOptions = recentlyUsedOptions.filter((option) => option !== selectedValue && fieldOptions.includes(option));
if (filteredRecentlyUsedOptions.length > 0) {
newSections.push({
title: translate('common.recents'),
Expand Down

0 comments on commit cd7d814

Please sign in to comment.