Skip to content

The open alternative to Salesforce, designed for AI.

Fix DateTimeSettingsTimeZoneSelect (#7688)

Marie17ec538da5f0
diff --git a/packages/twenty-front/src/pages/settings/profile/appearance/components/DateTimeSettingsTimeZoneSelect.tsx b/packages/twenty-front/src/pages/settings/profile/appearance/components/DateTimeSettingsTimeZoneSelect.tsx
index 348cfded077..237550a1a72 100644
--- a/packages/twenty-front/src/pages/settings/profile/appearance/components/DateTimeSettingsTimeZoneSelect.tsx
+++ b/packages/twenty-front/src/pages/settings/profile/appearance/components/DateTimeSettingsTimeZoneSelect.tsx
@@ -2,6 +2,7 @@ import { detectTimeZone } from '@/localization/utils/detectTimeZone';
import { findAvailableTimeZoneOption } from '@/localization/utils/findAvailableTimeZoneOption';
import { AVAILABLE_TIMEZONE_OPTIONS } from '@/settings/accounts/constants/AvailableTimezoneOptions';
import { Select } from '@/ui/input/components/Select';
+import { isDefined } from '~/utils/isDefined';
type DateTimeSettingsTimeZoneSelectProps = {
value?: string;
@@ -25,7 +26,9 @@ export const DateTimeSettingsTimeZoneSelect = ({
value={value}
options={[
{
- label: `System settings - ${systemTimeZoneOption.label}`,
+ label: isDefined(systemTimeZoneOption)
+ ? `System settings - ${systemTimeZoneOption.label}`
+ : 'System settings',
value: 'system',
},
...AVAILABLE_TIMEZONE_OPTIONS,