Skip to content

Commit

Permalink
Fix: Remove toggleCollapse string (#1951)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElinorW committed Jul 25, 2022
1 parent 01a8e74 commit 8fae57a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/utils/generate-groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export function generateGroupsFromList(list: any[], property: string) : IGroup[]
let isCollapsed = false;
let previousCount = 0;
let count = 0;
const toggleCollapse: string = isCollapsed ? 'collapsed ': 'expanded '

if (!list || list.length === 0 || list.some(e => !e[property])) {
return groups;
Expand All @@ -17,7 +16,7 @@ export function generateGroupsFromList(list: any[], property: string) : IGroup[]
if (!map.has(listItem[property])) {
map.set(listItem[property], true);
count = list.filter(item => item[property] === listItem[property]).length;
const ariaLabel: string = listItem[property] + ' has ' + count + ' results ' + toggleCollapse;
const ariaLabel: string = listItem[property] + ' has ' + count + ' results ';
if (groups.length > 0) {
isCollapsed = true;
}
Expand Down

0 comments on commit 8fae57a

Please sign in to comment.