Skip to content

Commit 51ecdf0

Browse files
refactor: refactor code
1 parent a36207f commit 51ecdf0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/profile/forms/Country.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ class Country extends React.Component {
4949

5050
isDisabledCountry = (country) => {
5151
const { countries } = this.props;
52+
const countriesCode = new Set(countries.map(({ code }) => code));
5253

53-
return countries.length > 0 && !new Set(countries.map(({ code }) => code)).has(country);
54+
return countries.length > 0 && !countriesCode.has(country);
5455
};
5556

5657
render() {

0 commit comments

Comments
 (0)