From b72e180ee4a788ff1a3c2955a061646561b2b735 Mon Sep 17 00:00:00 2001 From: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com> Date: Sat, 20 Jul 2019 07:22:36 +0900 Subject: [PATCH] forEach -> map --- src/client/app/desktop/views/components/activity.calendar.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/app/desktop/views/components/activity.calendar.vue b/src/client/app/desktop/views/components/activity.calendar.vue index da74a97f68..b8d2dd42ce 100644 --- a/src/client/app/desktop/views/components/activity.calendar.vue +++ b/src/client/app/desktop/views/components/activity.calendar.vue @@ -40,7 +40,7 @@ export default Vue.extend({ const day = now.getDate(); let x = 20; - this.data.slice().forEach((d, i) => { + this.data = this.data.map((d, i) => { d.x = x; const date = new Date(year, month, day - i); @@ -59,6 +59,8 @@ export default Vue.extend({ d.color = `hsl(${ch}, ${cs}%, ${cl}%)`; if (d.date.weekday == 0) x--; + + return d; }); } });