mirror of
https://github.com/desktop/desktop
synced 2024-10-31 05:19:03 +00:00
Update app/src/ui/dropdown-select-button.tsx
Co-authored-by: Sergio Padrino <sergio.padrino@gmail.com>
This commit is contained in:
parent
26d7ca2050
commit
9280f9df5a
1 changed files with 1 additions and 4 deletions
|
@ -140,10 +140,7 @@ export class DropdownSelectButton extends React.Component<
|
|||
}
|
||||
|
||||
const selectedOption = options.find(o => o.id === selectedValue)
|
||||
if (selectedOption === undefined) {
|
||||
return options[0]
|
||||
}
|
||||
return selectedOption
|
||||
return selectedOption ?? options[0]
|
||||
}
|
||||
|
||||
private onItemClick = (
|
||||
|
|
Loading…
Reference in a new issue