lib/tobox/fetcher.rb in tobox-0.1.1 vs lib/tobox/fetcher.rb in tobox-0.1.2
- old
+ new
@@ -117,10 +117,10 @@
end
def try_json_parse(data)
return unless data
- data = JSON.parse(data.to_s) unless data.is_a?(Hash)
+ data = JSON.parse(data.to_s) unless data.respond_to?(:to_hash)
data
end
def handle_before_event(event)