diff --git a/lib/sidecloq/schedule.rb b/lib/sidecloq/schedule.rb index ff3d46e..66acd04 100644 --- a/lib/sidecloq/schedule.rb +++ b/lib/sidecloq/schedule.rb @@ -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] || []