From d73a87b1b9eae4616077e7e530465c7b7d227e6c Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 15 Apr 2023 01:01:36 +0900 Subject: [PATCH] prevent crashes due to timezone === null --- packages/client/src/pages/user/home.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/client/src/pages/user/home.vue b/packages/client/src/pages/user/home.vue index 84ee4b0a3..8c1c82d06 100644 --- a/packages/client/src/pages/user/home.vue +++ b/packages/client/src/pages/user/home.vue @@ -374,6 +374,8 @@ const timeForThem = $computed(() => { if (tzInfo.length == 0) continue; const tz = tzInfo[0].timezone; + if (!tz) continue; + const theirTime = new Date().toLocaleString("en-US", { timeZone: tz, hour12: false,