mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Check site default locale if Rtl class is initialized without a user (#8417)
This commit is contained in:
@@ -13,7 +13,7 @@ class Rtl
|
|||||||
end
|
end
|
||||||
|
|
||||||
def current_user_rtl?
|
def current_user_rtl?
|
||||||
SiteSetting.allow_user_locale && user.try(:locale).in?(rtl_locales)
|
SiteSetting.allow_user_locale && (user&.locale || SiteSetting.default_locale).in?(rtl_locales)
|
||||||
end
|
end
|
||||||
|
|
||||||
def site_locale_rtl?
|
def site_locale_rtl?
|
||||||
|
|||||||
Reference in New Issue
Block a user