sdess09 2 лет назад
Родитель
Сommit
33137aaff1
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      dashboard/src/main/home/modals/UpdateClusterModal.tsx

+ 3 - 3
dashboard/src/main/home/modals/UpdateClusterModal.tsx

@@ -37,7 +37,7 @@ class UpdateClusterModal extends Component<PropsType, StateType> {
   };
 
   handleDelete = async () => {
-    let { currentProject, currentCluster } = this.context;
+    let { currentProject, currentCluster, setCurrentCluster } = this.context;
     this.setState({ status: "loading" });
 
     await api.updateOnboardingStep(
@@ -87,8 +87,8 @@ class UpdateClusterModal extends Component<PropsType, StateType> {
               .then(async (res) => {
                 if (res.data) {
                   let clusters = res.data;
-
-                  if (!currentProject.multi_cluster || clusters?.length() == 1) {
+                  if (clusters.length == 0 || !currentProject.multi_cluster) {
+                    setCurrentCluster(null)
                     await api.saveOnboardingState(
                       "<token>",
                       { current_step: "connect_source" },