Commit 116e367e by Marcus Efraimsson

fix time regions mutable bug

parent 81efc00a
...@@ -86,8 +86,10 @@ export class TimeRegionManager { ...@@ -86,8 +86,10 @@ export class TimeRegionManager {
let i, hRange, timeRegion, regions, fromStart, fromEnd, timeRegionColor; let i, hRange, timeRegion, regions, fromStart, fromEnd, timeRegionColor;
for (i = 0; i < panel.timeRegions.length; i++) { const timeRegionsCopy = panel.timeRegions.map(a => ({ ...a }));
timeRegion = panel.timeRegions[i];
for (i = 0; i < timeRegionsCopy.length; i++) {
timeRegion = timeRegionsCopy[i];
if (!(timeRegion.fromDayOfWeek || timeRegion.from) && !(timeRegion.toDayOfWeek || timeRegion.to)) { if (!(timeRegion.fromDayOfWeek || timeRegion.from) && !(timeRegion.toDayOfWeek || timeRegion.to)) {
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment