File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,9 @@ export default {
268268 filteredCountries () {
269269 // List countries after filtered
270270 if (this .onlyCountries .length ) {
271- return this .getCountries (this .onlyCountries );
271+ return this .onlyCountries
272+ .map ((iso ) => this .allCountries .find ((c ) => c .iso2 === iso .toUpperCase ()))
273+ .filter (Boolean );
272274 }
273275
274276 if (this .ignoredCountries .length ) {
@@ -433,7 +435,7 @@ export default {
433435 .filter (Boolean );
434436 },
435437 findCountry (iso = ' ' ) {
436- return this .allCountries .find ((country ) => country .iso2 === iso .toUpperCase ());
438+ return this .filteredCountries .find ((country ) => country .iso2 === iso .toUpperCase ());
437439 },
438440 getItemClass (index , iso2 ) {
439441 const highlighted = this .selectedIndex === index;
You can’t perform that action at this time.
0 commit comments