From a2e56314fe10cc4b45fb6a684473e1cd39a9982b 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 84ee4b0a30..8c1c82d065 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,