Skip to content

Commit d26e520

Browse files
committed
fix: check for nil body rather than falsey body when determining how to render mocked response
Fixes: #99
1 parent e763e58 commit d26e520

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pact/mock_service/request_handlers/interaction_replay.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def self.response_from response
182182
end
183183

184184
def self.render_body body
185-
return '' unless body
185+
return '' if body.nil?
186186
body.kind_of?(String) ? body.force_encoding('utf-8') : body.to_json
187187
end
188188
end

0 commit comments

Comments
 (0)