lib/mailerlite/middleware/fix_unparsed_json.rb in mailerlite-1.12.0 vs lib/mailerlite/middleware/fix_unparsed_json.rb in mailerlite-1.13.0

- old
+ new

@@ -2,13 +2,13 @@ module MailerLite module Middleware # This middleware will convert empty response to {} class FixUnparsedJson < Faraday::Response::Middleware - private + def parse(body) + return '{}' if body == '' - def on_complete(response) - response[:body] = {} if response[:body] == '' + body end end end end