use find() instead of children() to find language entries (#105)

site-osm-baustelle
Hartmut Holzgraefe 2023-01-16 23:56:47 +01:00
rodzic 05542b7ba8
commit f704b6c264
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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());
@ -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());