From f704b6c26481d354914262dd4d64f796bed7ee7d Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Mon, 16 Jan 2023 23:56:47 +0100 Subject: [PATCH] use find() instead of children() to find language entries (#105) --- www/maposmatic/templates/maposmatic/wizard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/maposmatic/templates/maposmatic/wizard.js b/www/maposmatic/templates/maposmatic/wizard.js index b8d45b9b..9db8cf6c 100644 --- a/www/maposmatic/templates/maposmatic/wizard.js +++ b/www/maposmatic/templates/maposmatic/wizard.js @@ -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());