TimeSeries/Trend: Fix infinite loop (#107615)

pull/107618/head
Bogdan Matei 2 weeks ago committed by GitHub
parent c02f76d89a
commit 47e5bd2316
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      public/app/core/components/TimeSeries/utils.ts

@ -394,13 +394,13 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn = ({
else {
// scan right
let leftIdx = 0;
while (yData[leftIdx] == null) {
while (yData[leftIdx] === null) {
leftIdx++;
}
// scan left
let rightIdx = yData.length - 1;
while (rightIdx >= leftIdx && yData[rightIdx] == null) {
while (rightIdx >= leftIdx && yData[rightIdx] === null) {
rightIdx--;
}

Loading…
Cancel
Save