Remove valid aggregation type check (#43955)

This commit is contained in:
Shirley 2022-01-12 15:36:56 +01:00 committed by GitHub
parent f881fd1637
commit 105bf8fd94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,9 +257,7 @@ export const useMetricMetadata = (query: AzureMonitorQuery, datasource: Datasour
// Update the query state in response to the meta data changing
useEffect(() => {
const aggregationIsValid = aggregation && metricMetadata.supportedAggTypes.includes(aggregation);
const newAggregation = aggregationIsValid ? aggregation : metricMetadata.primaryAggType;
const newAggregation = aggregation || metricMetadata.primaryAggType;
const newTimeGrain = timeGrain || 'auto';
if (newAggregation !== aggregation || newTimeGrain !== timeGrain) {