Skip to content

Commit

Permalink
empty config files shouldn't raise exception
Browse files Browse the repository at this point in the history
fixes #47
  • Loading branch information
mattyr committed Nov 5, 2023
1 parent 235cebf commit 3d13429
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sidecloq/schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def self.from_redis
def self.from_hash(hash)
hash = hash[env] if hash.key?(env)

specs = hash.each_with_object({}) do |(name, spec), memo|
specs = (hash || []).each_with_object({}) do |(name, spec), memo|
memo[name] = spec.dup.tap do |s|
s['class'] = name unless spec.key?('class') || spec.key?(:class)
s['args'] = s['args'] || s[:args] || []
Expand Down

0 comments on commit 3d13429

Please sign in to comment.