From e6c1f9be26c1e185f016df261abf41e828189012 Mon Sep 17 00:00:00 2001 From: Turiiya <34311583+ttytm@users.noreply.github.com> Date: Sat, 7 Sep 2024 14:49:52 +0200 Subject: [PATCH] Resolve warning for `??` operator will always return left operand --- src/common/hooks/useCompanyTimeZone.ts | 2 +- src/common/hooks/useCurrentCompanyDateFormats.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/hooks/useCompanyTimeZone.ts b/src/common/hooks/useCompanyTimeZone.ts index 4260c0094..9f189a838 100644 --- a/src/common/hooks/useCompanyTimeZone.ts +++ b/src/common/hooks/useCompanyTimeZone.ts @@ -23,7 +23,7 @@ export function useCompanyTimeZone() { useEffect(() => { if (statics?.timezones) { const result = statics.timezones.find( - (format: any) => format.id === company?.settings?.timezone_id ?? '1' + (format: any) => format.id === (company?.settings?.timezone_id ?? '1') ); if (result) { diff --git a/src/common/hooks/useCurrentCompanyDateFormats.ts b/src/common/hooks/useCurrentCompanyDateFormats.ts index 8611cacdc..8ea747cb1 100644 --- a/src/common/hooks/useCurrentCompanyDateFormats.ts +++ b/src/common/hooks/useCurrentCompanyDateFormats.ts @@ -23,7 +23,7 @@ export function useCurrentCompanyDateFormats() { useEffect(() => { if (statics?.date_formats) { const result = statics.date_formats.find( - (format: any) => format.id === company?.settings?.date_format_id ?? '0' + (format: any) => format.id === (company?.settings?.date_format_id ?? '0') ); if (result) {