From 74370ac5577b2a859a116bdff57fa1d07a400b54 Mon Sep 17 00:00:00 2001 From: Totto16 Date: Wed, 23 Nov 2022 22:41:39 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20Code=20review=20:=20implemented?= =?UTF-8?q?=20the=20requested=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Widgets/Clock.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/Widgets/Clock.vue b/src/components/Widgets/Clock.vue index 26414db2..9b238f45 100644 --- a/src/components/Widgets/Clock.vue +++ b/src/components/Widgets/Clock.vue @@ -37,12 +37,10 @@ export default { return this.timeZone.split('/')[1].replaceAll('_', ' '); }, showSeconds() { - if (this.options.hideSeconds) return !this.options.hideSeconds; - // this is the default - return true; + return !this.options.hideSeconds; }, use12Hour() { - if (this.options.use12Hour) return this.options.use12Hour; + if (typeof this.options.use12Hour === "boolean") return this.options.use12Hour; // this is the default, it gets computed by the DateTimeFormat implementation return Intl.DateTimeFormat(this.timeFormat, { timeZone: this.timeZone, hour: 'numeric' }).resolvedOptions().hour12 ?? false; },