Fix error reseting (#40893)

This commit is contained in:
Ivana Huckova
2021-10-26 13:07:11 +02:00
committed by GitHub
parent c43776aec3
commit ce8e569700

View File

@@ -26,7 +26,8 @@ export function PromExemplarField({ datasource, onChange, query }: Props) {
onChange(false); onChange(false);
} else { } else {
setError(null); setError(null);
if (prevError !== error) { // If error is cleared, we want to change exemplar to true
if (prevError && !error) {
onChange(true); onChange(true);
} }
} }