mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix time regions mutable bug
This commit is contained in:
parent
81efc00adf
commit
116e367e71
@ -86,8 +86,10 @@ export class TimeRegionManager {
|
||||
|
||||
let i, hRange, timeRegion, regions, fromStart, fromEnd, timeRegionColor;
|
||||
|
||||
for (i = 0; i < panel.timeRegions.length; i++) {
|
||||
timeRegion = panel.timeRegions[i];
|
||||
const timeRegionsCopy = panel.timeRegions.map(a => ({ ...a }));
|
||||
|
||||
for (i = 0; i < timeRegionsCopy.length; i++) {
|
||||
timeRegion = timeRegionsCopy[i];
|
||||
|
||||
if (!(timeRegion.fromDayOfWeek || timeRegion.from) && !(timeRegion.toDayOfWeek || timeRegion.to)) {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user