Skip to content

Commit

Permalink
Merge pull request #2917 from Gkrumbach07/fix-metric-cols
Browse files Browse the repository at this point in the history
 Refactor useMetricColumnNames to handle empty experimentId
  • Loading branch information
openshift-merge-bot[bot] authored Jun 14, 2024
2 parents 48a6201 + 14f80ac commit c9ec3f9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export const useMetricColumnNames = (experimentId: string, metricsNames: Set<str
],
[firstDefaultMetricColumn, secondDefaultMetricColumn],
);
const metricsColumnNames = storedMetricsColumnNames ?? defaultMetricsColumnNames;
const metricsColumnNames = experimentId
? storedMetricsColumnNames ?? defaultMetricsColumnNames
: [];

// Set default metric columns in localStorage when no prior stored
// columns exist and at least 1 metric exists to use as a default.
Expand Down

0 comments on commit c9ec3f9

Please sign in to comment.