Skip to content

Commit

Permalink
minor naming change.
Browse files Browse the repository at this point in the history
Signed-off-by: Krishna Gupta <[email protected]>
  • Loading branch information
Krishna2323 committed Mar 23, 2024
1 parent b3a6f24 commit a592191
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libs/OptionsListUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -960,11 +960,11 @@ function getCategoryListSections(
const enabledCategories = Object.values(sortedCategories).filter((category) => category.enabled);

const categorySections: CategoryTreeSection[] = [];
const numberOfCategories = enabledCategories.length;
const numberOfEnabledCategories = enabledCategories.length;

let indexOffset = 0;

if (numberOfCategories === 0 && selectedOptions.length > 0) {
if (numberOfEnabledCategories === 0 && selectedOptions.length > 0) {
categorySections.push({
// "Selected" section
title: '',
Expand Down Expand Up @@ -1015,7 +1015,7 @@ function getCategoryListSections(
const selectedOptionNames = selectedOptions.map((selectedOption) => selectedOption.name);
const enabledWithoutSelectedCategories = sortedCategories.filter((category) => category.enabled && !selectedOptionNames.includes(category.name));

if (numberOfCategories < CONST.CATEGORY_LIST_THRESHOLD) {
if (numberOfEnabledCategories < CONST.CATEGORY_LIST_THRESHOLD) {
categorySections.push({
// "All" section when items amount less than the threshold
title: '',
Expand Down

0 comments on commit a592191

Please sign in to comment.