diff --git a/src/renderer/ipc/invalid-kubeconfig-handler.tsx b/src/renderer/ipc/invalid-kubeconfig-handler.tsx index 783376b880..df8c959f63 100644 --- a/src/renderer/ipc/invalid-kubeconfig-handler.tsx +++ b/src/renderer/ipc/invalid-kubeconfig-handler.tsx @@ -10,7 +10,7 @@ export const invalidKubeconfigHandler = { channel: InvalidKubeconfigChannel, listener: InvalidKubeconfigListener, verifier: (args: [unknown]): args is InvalidKubeConfigArgs => { - return args.length === 1; + return args.length === 1 && typeof args[0] === "string" && !!clusterStore.getById(args[0]); }, }; @@ -22,8 +22,8 @@ function InvalidKubeconfigListener(event: IpcRendererEvent, ...[clusterId]: Inva (
Cluster with invalid Kubeconfig Detected! -

Cluster {cluster.name} has invalid { e.preventDefault(); shell.showItemInFolder(cluster.kubeConfigPath); }}>Kubeconfig and cannot be displayed. - Please fix the Kubeconfig or remove the cluster.

+

Cluster {cluster.name} has invalid kubeconfig and cannot be displayed. + Please fix the { e.preventDefault(); shell.showItemInFolder(cluster.kubeConfigPath); }}>kubeconfig manually or remove the cluster.

Do you want to remove the cluster now?