Przeglądaj źródła

Merge pull request #2293 from porter-dev/nico/por-653-revision-delete-is-removing-chart-from

[POR-653] Revision delete is removing chart from chart list
abelanger5 3 lat temu
rodzic
commit
a07156a822

+ 4 - 1
dashboard/src/main/home/cluster-dashboard/chart/ChartList.tsx

@@ -140,7 +140,10 @@ const ChartList: React.FunctionComponent<Props> = ({
                 return chart;
               });
             case "DELETE":
-              return tmpCharts.filter((chart) => !isSameChart(chart));
+              const chartToDelete = tmpCharts.find(isSameChart);
+              if (chartToDelete.version === newChart.version) {
+                return tmpCharts.filter((chart) => !isSameChart(chart));
+              }
             default:
               return tmpCharts;
           }