Fix error 500 when passing an invalid `lang` parameter (#33467)

pull/33401/head
Claire 6 days ago committed by GitHub
parent dbbf450ef5
commit ea9b10d112
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -25,7 +25,7 @@ module Localized
end end
def available_locale_or_nil(locale_name) def available_locale_or_nil(locale_name)
locale_name.to_sym if locale_name.present? && I18n.available_locales.include?(locale_name.to_sym) locale_name.to_sym if locale_name.respond_to?(:to_sym) && I18n.available_locales.include?(locale_name.to_sym)
end end
def content_locale def content_locale

Loading…
Cancel
Save