mirror of
https://github.com/mastodon/mastodon.git
synced 2025-01-08 19:35:11 +01:00
Fix error 500 when passing an invalid lang
parameter (#33467)
This commit is contained in:
parent
dbbf450ef5
commit
ea9b10d112
@ -25,7 +25,7 @@ module Localized
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
def content_locale
|
||||
|
Loading…
Reference in New Issue
Block a user