@@ -19,8 +19,9 @@ import CONST from '@src/CONST';
1919import type { TranslationPaths } from '@src/languages/types' ;
2020import ONYXKEYS from '@src/ONYXKEYS' ;
2121import ROUTES from '@src/ROUTES' ;
22+ import { isEmptyObject } from '@src/types/utils/EmptyObject' ;
2223
23- function CountrySelection ( { isEditing, onNext, formValues, resetScreenIndex} : CustomSubStepProps ) {
24+ function CountrySelection ( { isEditing, onNext, formValues, resetScreenIndex, fieldsMap } : CustomSubStepProps ) {
2425 const { translate} = useLocalize ( ) ;
2526 const { isOffline} = useNetwork ( ) ;
2627 const styles = useThemeStyles ( ) ;
@@ -37,13 +38,13 @@ function CountrySelection({isEditing, onNext, formValues, resetScreenIndex}: Cus
3738 }
3839 return ;
3940 }
40- if ( formValues . bankCountry === currentCountry ) {
41+ if ( ! isEmptyObject ( fieldsMap ) && formValues . bankCountry === currentCountry ) {
4142 onNext ( ) ;
4243 return ;
4344 }
4445 fetchCorpayFields ( currentCountry ) ;
4546 resetScreenIndex ?.( CONST . CORPAY_FIELDS . INDEXES . MAPPING . BANK_ACCOUNT_DETAILS ) ;
46- } , [ currentCountry , formValues . bankCountry , onNext , resetScreenIndex , isUserValidated ] ) ;
47+ } , [ currentCountry , fieldsMap , formValues . bankCountry , resetScreenIndex , isUserValidated , onNext ] ) ;
4748
4849 const onSelectionChange = useCallback ( ( country : Option ) => {
4950 setCurrentCountry ( country . value ) ;
0 commit comments