Remove un-needed edge case sort condition in languages helper (#31724)

This commit is contained in:
Matt Jankowski authored and GitHub committed 2024-09-03 13:19:48 +00:00
1 parent 219458d7d4
commit c9641c8070
1 file changed
+1 -3
+1 -3
View File
@@ -238,9 +238,7 @@ module LanguagesHelper
# Helper for self.sorted_locale_keys
private_class_method def self.locale_name_for_sorting(locale)
if locale.blank? || locale == 'und'
'000'
elsif (supported_locale = SUPPORTED_LOCALES[locale.to_sym])
if (supported_locale = SUPPORTED_LOCALES[locale.to_sym])
ASCIIFolding.new.fold(supported_locale[1]).downcase
elsif (regional_locale = REGIONAL_LOCALE_NAMES[locale.to_sym])
ASCIIFolding.new.fold(regional_locale).downcase