Skip to content

Commit

Permalink
Use optional chaining on machineSelectorConfig
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Rak <[email protected]>
  • Loading branch information
rak-phillip committed Oct 17, 2024
1 parent aa015ed commit 8685e05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shell/models/provisioning.cattle.io.cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ export default class ProvCluster extends SteveModel {
// The one we want is the first one with no selector.
// If there are multiple with no selector, that will fall under the unsupported message below.
return this.spec.rkeConfig?.machineSelectorConfig
.find((x) => !x.machineLabelSelector)?.config || { };
?.find((x) => !x.machineLabelSelector)?.config || { };
}

get cloudProvider() {
Expand Down

0 comments on commit 8685e05

Please sign in to comment.