From 8685e05f476a7a2e97fe1fdeeaf7ca6f4a15162e Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Thu, 17 Oct 2024 09:11:07 -0700 Subject: [PATCH] Use optional chaining on `machineSelectorConfig` Signed-off-by: Phillip Rak --- shell/models/provisioning.cattle.io.cluster.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/models/provisioning.cattle.io.cluster.js b/shell/models/provisioning.cattle.io.cluster.js index b9a823bb1c6..0d9134ced4a 100644 --- a/shell/models/provisioning.cattle.io.cluster.js +++ b/shell/models/provisioning.cattle.io.cluster.js @@ -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() {