prevent crashes due to timezone === null

This commit is contained in:
naskya 2023-04-15 01:01:36 +09:00
parent 4d0245f1a5
commit a2e56314fe
No known key found for this signature in database
GPG Key ID: 164DFF24E2D40139
1 changed files with 2 additions and 0 deletions

View File

@ -374,6 +374,8 @@ const timeForThem = $computed(() => {
if (tzInfo.length == 0) continue; if (tzInfo.length == 0) continue;
const tz = tzInfo[0].timezone; const tz = tzInfo[0].timezone;
if (!tz) continue;
const theirTime = new Date().toLocaleString("en-US", { const theirTime = new Date().toLocaleString("en-US", {
timeZone: tz, timeZone: tz,
hour12: false, hour12: false,