Explorar el Código

Merge pull request #2246 from porter-dev/belanger/hotfix-jobs-page

Add more casing to prevent infinite load on jobs page
abelanger5 hace 3 años
padre
commit
84041a3b5c

+ 5 - 0
dashboard/src/main/home/cluster-dashboard/expanded-chart/useStackEnvGroups.ts

@@ -51,6 +51,11 @@ export const useStackEnvGroups = (chart: ChartType) => {
   useEffect(() => {
     const stack_id = chart?.stack_id;
     if (!stack_id) {
+      // if the chart has been loaded and the chart doesn't have a stack id, set loading to false
+      if (loading && chart) {
+        setLoading(false);
+      }
+
       return;
     }
     setLoading(true);