diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-09-28 01:02:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-28 01:02:15 +0200 |
commit | 0d0f3c15d3b510b7e6bd975f3725aaf63b52d971 (patch) | |
tree | 90cc241cabf5675638eb78de8069e7e5eb77c138 | |
parent | 55a2e9b5beb1fc923c42257edee3df738e208b38 (diff) |
Fix language dropdown sometimes not appearing in web UI (#19246)
When user has no locale preference saved (such as never changing it from the default), the preferred posting language is nil, and the dropdown is not visible
-rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 342f5e6cc..4767189a0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -282,7 +282,7 @@ class User < ApplicationRecord end def preferred_posting_language - valid_locale_cascade(settings.default_language, locale) + valid_locale_cascade(settings.default_language, locale, I18n.locale) end def setting_default_privacy |