FIX: Rails.logger isn't always available when loading plugin locales
This commit is contained in:
parent
c08c725c54
commit
6901e0e043
|
@ -591,7 +591,13 @@ JS
|
|||
DiscoursePluginRegistry.register_locale(locale, opts)
|
||||
Rails.configuration.assets.precompile << "locales/#{locale}.js"
|
||||
else
|
||||
Rails.logger.error "Invalid locale! #{opts.inspect}"
|
||||
msg = "Invalid locale! #{opts.inspect}"
|
||||
# The logger isn't always present during boot / parsing locales from plugins
|
||||
if Rails.logger.present?
|
||||
Rails.logger.error(msg)
|
||||
else
|
||||
puts msg
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue