FIX: "false" didn't work as locale_default

This commit is contained in:
Gerhard Schlager
2018-09-11 13:20:42 +02:00
parent e847bb33d5
commit 1a01385e88
2 changed files with 16 additions and 4 deletions

View File

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