mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 09:08:10 +08:00
FIX: "false" didn't work as locale_default
This commit is contained in:
@ -38,8 +38,10 @@ class SiteSettings::DefaultsProvider
|
||||
end
|
||||
|
||||
def get(name, locale = DEFAULT_LOCALE)
|
||||
@defaults.dig(locale.to_sym, name.to_sym) ||
|
||||
@defaults.dig(DEFAULT_LOCALE.to_sym, name.to_sym)
|
||||
value = @defaults.dig(locale.to_sym, name.to_sym)
|
||||
return value unless value.nil?
|
||||
|
||||
@defaults.dig(DEFAULT_LOCALE.to_sym, name.to_sym)
|
||||
end
|
||||
alias [] get
|
||||
|
||||
|
Reference in New Issue
Block a user