[MM-44071] Fixed an issue where the first certificate could not be selected (#2162) (#2166)

(cherry picked from commit 055c699c70)

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
This commit is contained in:
Mattermost Build 2022-06-22 18:05:08 +03:00 committed by GitHub
parent b5d8db9f8c
commit 8a16e30dcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,7 +95,7 @@ export default class SelectCertificateModal extends React.PureComponent<Props, S
}
getSelectedCert = () => {
if (this.state.list && this.state.selectedIndex) {
if (this.state.list && this.state.selectedIndex !== undefined) {
return this.state.list[this.state.selectedIndex];
}
return undefined;