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
pull/1848/head
Eugen Rochko 2022-09-28 01:02:15 +02:00 committed by GitHub
parent 55a2e9b5be
commit 0d0f3c15d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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