Skip to content

Commit

Permalink
Fix NoMethodError with invalid locales
Browse files Browse the repository at this point in the history
  • Loading branch information
BGMP committed Mar 20, 2024
1 parent d2e71cd commit aca4380
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Expand Up @@ -15,7 +15,7 @@ def set_locale

locale = params[:locale] || locale_from_header

if SYS::LOCALES_MAP.values.include?(locale.to_sym)
if !locale.nil? && SYS::LOCALES_MAP.values.include?(locale.to_sym)
I18n.locale = locale
else
I18n.locale = I18n.default_locale
Expand Down

0 comments on commit aca4380

Please sign in to comment.