Merge pull request #17142 from desktop/fix-section-aria-label

Fix aria-label of branches list groups when some of the groups is not present
This commit is contained in:
Sergio Padrino 2023-07-31 23:45:53 +02:00 committed by GitHub
commit 4710fce429
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -291,12 +291,9 @@ export class BranchList extends React.Component<
}
private getGroupAriaLabel = (group: number) => {
const GroupIdentifiers: ReadonlyArray<BranchGroupIdentifier> = [
'default',
'recent',
'other',
]
return this.getGroupLabel(GroupIdentifiers[group])
const identifier = this.state.groups[group]
.identifier as BranchGroupIdentifier
return this.getGroupLabel(identifier)
}
private renderGroupHeader = (label: string) => {