lib/twitch/bot/memory/redis.rb in twitch-bot-5.0.2 vs lib/twitch/bot/memory/redis.rb in twitch-bot-5.0.4
- old
+ new
@@ -17,10 +17,10 @@
redis.set(key, value.to_json)
end
def retrieve(key)
value = redis.get(key)
- JSON.parse(value)
+ value.nil? ? nil : JSON.parse(value)
end
private
attr_reader :client, :redis