1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix not being able to select roles and clusterroles

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-06-09 12:38:59 -04:00
parent 1c493dac67
commit 5f98751e56
2 changed files with 2 additions and 2 deletions

View File

@ -199,7 +199,7 @@ export class ClusterRoleBindingDialog extends React.Component<Props> {
options={this.clusterRoleRefoptions}
value={this.selectedRoleRef}
onChange={({ value }: SelectOption<ClusterRole> ) => {
if (this.bindingName === this.selectedRoleRef.getName()) {
if (!this.selectedRoleRef || this.bindingName === this.selectedRoleRef.getName()) {
this.bindingName = value.getName();
}

View File

@ -217,7 +217,7 @@ export class RoleBindingDialog extends React.Component<Props> {
options={this.roleRefOptions}
value={this.selectedRoleRef}
onChange={({ value }) => {
if (this.bindingName === this.selectedRoleRef.getName()) {
if (!this.selectedRoleRef || this.bindingName === this.selectedRoleRef.getName()) {
this.bindingName = value.getName();
}