From cd7d8146b79ee04a1598a6f9b1733e6a3ec06633 Mon Sep 17 00:00:00 2001 From: Aldo Canepa Date: Mon, 25 Mar 2024 13:18:29 -0700 Subject: [PATCH] Filter out unexisting options from "Recents" --- src/pages/EditReportFieldDropdownPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/EditReportFieldDropdownPage.tsx b/src/pages/EditReportFieldDropdownPage.tsx index a3d9c2fd99ff..3bd227c5dcf1 100644 --- a/src/pages/EditReportFieldDropdownPage.tsx +++ b/src/pages/EditReportFieldDropdownPage.tsx @@ -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'),