diff --git a/src/components/CategoryPicker/index.js b/src/components/CategoryPicker/index.js index ef8b1d71ad1d..13abf057e4b1 100644 --- a/src/components/CategoryPicker/index.js +++ b/src/components/CategoryPicker/index.js @@ -32,6 +32,7 @@ function CategoryPicker({selectedCategory, policyCategories, policyRecentlyUsedC }, [selectedCategory]); const sections = useMemo(() => { + const validPolicyRecentlyUsedCategories = _.filter(policyRecentlyUsedCategories, (p) => !_.isEmpty(p)); const {categoryOptions} = OptionsListUtils.getFilteredOptions( {}, {}, @@ -43,7 +44,7 @@ function CategoryPicker({selectedCategory, policyCategories, policyRecentlyUsedC false, true, policyCategories, - policyRecentlyUsedCategories, + validPolicyRecentlyUsedCategories, false, );