File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
backend/src/shared/services Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -59,13 +59,14 @@ export class FormatService {
5959 langISO . validate ( value ) ? langISO . getName ( value ) : value ;
6060
6161 mapIsoToCountry ( value : string ) {
62+ const valueLower = value . toLowerCase ( ) ;
6263 const country = CountryISO . get ( {
63- alpha_2 : value ,
64- alpha_3 : value ,
65- numeric : value ,
66- name : value ,
67- common_name : value ,
68- official_name : value ,
64+ alpha_2 : valueLower ,
65+ alpha_3 : valueLower ,
66+ numeric : valueLower ,
67+ name : valueLower ,
68+ common_name : valueLower ,
69+ official_name : valueLower ,
6970 } ) as Country ;
7071 // return country ? country.name : this.capitalizeFirstLetter(value);
7172 return country ? country . name : value ;
@@ -91,7 +92,7 @@ export class FormatService {
9192 if ( addOn == 'country' )
9293 value = value
9394 . split ( ',' )
94- . map ( ( d ) => this . mapIsoToCountry ( d . trim ( ) . toLowerCase ( ) ) ) ;
95+ . map ( ( d ) => this . mapIsoToCountry ( d . trim ( ) ) ) ;
9596 if ( addOn == 'language' )
9697 value = value
9798 . split ( ',' )
You can’t perform that action at this time.
0 commit comments