Skip to content

Commit

Permalink
fix thread key fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
jonian committed Jan 4, 2021
1 parent 9d4ee1a commit 45bbb7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/i18n/backend/fallbacks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class << self
# Returns the current fallbacks implementation. Defaults to +I18n::Locale::Fallbacks+.
def fallbacks
@@fallbacks ||= I18n::Locale::Fallbacks.new
Thread.current.key?(:i18n_fallbacks) ? Thread.current[:i18n_fallbacks] : @@fallbacks
Thread.current[:i18n_fallbacks] || @@fallbacks
end

# Sets the current fallbacks implementation. Use this to set a different fallbacks implementation.
Expand Down

0 comments on commit 45bbb7d

Please sign in to comment.