10,731
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 15: | Line 15: | ||
--[[ | --[[ | ||
function distance_sort(a, b) | function distance_sort(a, b) | ||
if type(a) ~= "string" or m_languages.find_by_code(a) == nil then | |||
return a < b | |||
end | |||
local a = m_languages.get_by_code(a) | local a = m_languages.get_by_code(a) | ||
local b = m_languages.get_by_code(b) | local b = m_languages.get_by_code(b) |