From f2049b73cdfcba06387b47b16d38993222a030f2 Mon Sep 17 00:00:00 2001 From: Pasichnichenkoilya Date: Mon, 29 Jul 2024 14:57:57 +0300 Subject: [PATCH] Sonar fix: removed use of the void operator --- .../tutor-home-page/general-info-step/GeneralInfoStep.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/containers/tutor-home-page/general-info-step/GeneralInfoStep.tsx b/src/containers/tutor-home-page/general-info-step/GeneralInfoStep.tsx index 5ae050f1d..22689fd81 100644 --- a/src/containers/tutor-home-page/general-info-step/GeneralInfoStep.tsx +++ b/src/containers/tutor-home-page/general-info-step/GeneralInfoStep.tsx @@ -152,8 +152,11 @@ const GeneralInfoStep = ({ handleGeneralInfo({ data, errors }) }, [data, errors, handleGeneralInfo]) - const onFocusCountry = - !data.country && !countries.length ? void fetchCountries : undefined + const onFocusCountry = async () => { + if (!data.country && !countries.length) { + await fetchCountries() + } + } if (userLoading) { return (