Skip to content

Commit

Permalink
use find() instead of children() to find language entries (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
hholzgra committed Jan 16, 2023
1 parent 05542b7 commit f704b6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions www/maposmatic/templates/maposmatic/wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function country_lang(country_code)
var list = $('#maplang_choices');
var success = 0;

list.children('a').each(function() {
list.find('a').each(function() {
var langcode = $(this)[0].dataset.langcode;
if (langcode.substring(3,5) == country_code.toUpperCase()) {
$('#map_language_button').html($(this).html());
Expand All @@ -190,7 +190,7 @@ function country_lang(country_code)
});

if (!success) {
list.children('a').each(function() {
list.find('a').each(function() {
var langcode = $(this)[0].dataset.langcode;
if (langcode == "C") {
$('#map_language_button').html($(this).html());
Expand Down

0 comments on commit f704b6c

Please # to comment.