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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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