Do not update value if it's not changed (#60746)

This commit is contained in:
Maryia Lapata 2020-03-20 18:25:06 +03:00 committed by GitHub
parent 54f8c49868
commit 6662e48e93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,7 +55,7 @@ function useFallbackMetric(
.filter(isCompatibleAgg)
.find(aggregation => aggregation.id === value);
if (!respAgg) {
if (!respAgg && value !== fallbackValue) {
setValue(fallbackValue);
}
}