Skip to content

Commit 94245c7

Browse files
committed
fix: don't try and fix producer keys for a nil string
Not sure how there is a nil string here, but at least it will more the error somewhere less confusing.
1 parent f3d4f7c commit 94245c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pact/consumer_contract/consumer_contract.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def self.from_uri uri, options = {}
5959
end
6060

6161
def self.maintain_backwards_compatiblity_with_producer_keys string
62-
string.gsub('"producer":', '"provider":').gsub('"producer_state":', '"provider_state":')
62+
string.gsub('"producer":', '"provider":').gsub('"producer_state":', '"provider_state":') if string
6363
end
6464

6565
def find_interaction criteria

0 commit comments

Comments
 (0)