PanelQueryRunner: Fix loading state (#79690)

This commit is contained in:
Torkel Ödegaard 2023-12-19 15:13:11 +01:00 committed by GitHub
parent 315dd75767
commit 82af0d6230
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -342,6 +342,7 @@ export class PanelQueryRunner {
if (last != null) { if (last != null) {
let sameSeries = compareArrayValues(last.series ?? [], next.series ?? [], (a, b) => a === b); let sameSeries = compareArrayValues(last.series ?? [], next.series ?? [], (a, b) => a === b);
let sameAnnotations = compareArrayValues(last.annotations ?? [], next.annotations ?? [], (a, b) => a === b); let sameAnnotations = compareArrayValues(last.annotations ?? [], next.annotations ?? [], (a, b) => a === b);
let sameState = last.state === next.state;
if (sameSeries) { if (sameSeries) {
next.series = last.series; next.series = last.series;
@ -351,7 +352,7 @@ export class PanelQueryRunner {
next.annotations = last.annotations; next.annotations = last.annotations;
} }
if (sameSeries && sameAnnotations) { if (sameSeries && sameAnnotations && sameState) {
return; return;
} }
} }