fix race condition in UserTimezoneMismatchModal

This commit is contained in:
Gregor Vostrak
2025-10-06 18:33:57 +02:00
parent b373427dc7
commit 8aabffd1e7

View File

@@ -27,9 +27,10 @@ onMounted(() => {
timezone.value = Intl.DateTimeFormat().resolvedOptions().timeZone;
userTimezone.value = getUserTimezone();
const now = getDayJsInstance()();
if (
getDayJsInstance()().tz(timezone.value).format() !==
getDayJsInstance()().tz(userTimezone.value).format() &&
now.tz(timezone.value).format() !== now.tz(userTimezone.value).format() &&
!hideTimezoneMismatchModal.value
) {
show.value = true;