lib/intercom/request.rb in intercom-0.2.2 vs lib/intercom/request.rb in intercom-0.2.3

- old
+ new

@@ -60,10 +60,10 @@ set_common_headers(net_http_method, base_uri) client(base_uri).start do |http| response = http.request(net_http_method) raise_errors_on_failure(response) decoded = decode(response['content-encoding'], response.body) - JSON.parse(decoded) unless decoded.empty? + JSON.parse(decoded) unless decoded.strip.empty? end rescue Timeout::Error raise Intercom::ServiceUnavailableError end