From d4a630902d8d250b67fcd0ce2b49240786b40368 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 4 Apr 2020 08:46:54 +0900 Subject: refactor: Use === --- src/client/widgets/activity.calendar.vue | 6 +++--- src/client/widgets/activity.vue | 4 ++-- src/client/widgets/calendar.vue | 4 ++-- src/client/widgets/photos.vue | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/client/widgets') diff --git a/src/client/widgets/activity.calendar.vue b/src/client/widgets/activity.calendar.vue index dfc0d29d3b..334c2ea56e 100644 --- a/src/client/widgets/activity.calendar.vue +++ b/src/client/widgets/activity.calendar.vue @@ -51,14 +51,14 @@ export default Vue.extend({ weekday: date.getDay() }; - d.v = peak == 0 ? 0 : d.total / (peak / 2); + d.v = peak === 0 ? 0 : d.total / (peak / 2); if (d.v > 1) d.v = 1; - const ch = d.date.weekday == 0 || d.date.weekday == 6 ? 275 : 170; + const ch = d.date.weekday === 0 || d.date.weekday === 6 ? 275 : 170; const cs = d.v * 100; const cl = 15 + ((1 - d.v) * 80); d.color = `hsl(${ch}, ${cs}%, ${cl}%)`; - if (d.date.weekday == 0) x--; + if (d.date.weekday === 0) x--; }); } }); diff --git a/src/client/widgets/activity.vue b/src/client/widgets/activity.vue index e08676c9a0..6c32642bb6 100644 --- a/src/client/widgets/activity.vue +++ b/src/client/widgets/activity.vue @@ -60,7 +60,7 @@ export default define({ }, methods: { func() { - if (this.props.design == 2) { + if (this.props.design === 2) { this.props.design = 0; } else { this.props.design++; @@ -68,7 +68,7 @@ export default define({ this.save(); }, toggleView() { - if (this.props.view == 1) { + if (this.props.view === 1) { this.props.view = 0; } else { this.props.view++; diff --git a/src/client/widgets/calendar.vue b/src/client/widgets/calendar.vue index b7d577c37d..c041734a4d 100644 --- a/src/client/widgets/calendar.vue +++ b/src/client/widgets/calendar.vue @@ -65,7 +65,7 @@ export default define({ }, methods: { func() { - if (this.props.design == 2) { + if (this.props.design === 2) { this.props.design = 0; } else { this.props.design++; @@ -102,7 +102,7 @@ export default define({ this.monthP = monthNumer / monthDenom * 100; this.yearP = yearNumer / yearDenom * 100; - this.isHoliday = now.getDay() == 0 || now.getDay() == 6; + this.isHoliday = now.getDay() === 0 || now.getDay() === 6; } } }); diff --git a/src/client/widgets/photos.vue b/src/client/widgets/photos.vue index fb2e6de0be..1deb6de62d 100644 --- a/src/client/widgets/photos.vue +++ b/src/client/widgets/photos.vue @@ -1,6 +1,6 @@