Skip to content

Commit a2b35cf

Browse files
HDingerCopilot
andauthored
Fallback for null value labels
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 226ae5f commit a2b35cf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/components/primer/alpha/select_panel_element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ export class SelectPanelElement extends HTMLElement {
959959
itemLabel = this.querySelector(`[${this.ariaSelectionType}=true] .ActionListItem-label`)?.textContent
960960
} else if (this.selectVariant === 'multiple') {
961961
itemLabel = Array.from(this.querySelectorAll(`[${this.ariaSelectionType}=true] .ActionListItem-label`))
962-
.map(label => label.textContent.trim())
962+
.map(label => label.textContent?.trim() ?? '')
963963
.join(', ')
964964
}
965965
itemLabel ||= this.#originalLabel

0 commit comments

Comments
 (0)