Skip to content

Commit

Permalink
fix: check for nil body rather than falsey body when determining how …
Browse files Browse the repository at this point in the history
…to render mocked response

Fixes: #99
  • Loading branch information
bethesque committed Jun 3, 2021
1 parent e763e58 commit d26e520
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def self.response_from response
end

def self.render_body body
return '' unless body
return '' if body.nil?
body.kind_of?(String) ? body.force_encoding('utf-8') : body.to_json
end
end
Expand Down

0 comments on commit d26e520

Please sign in to comment.