Commit 116e367e by Marcus Efraimsson

fix time regions mutable bug

parent 81efc00a
......@@ -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;
......
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