Skip to content

Commit

Permalink
Recursively pass options
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed Jan 7, 2020
1 parent 8b869b6 commit 72bf456
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/protobuf/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def to_json_hash(options = {})
# NB: to_json_hash_value should come before json_encode so as to handle
# repeated fields without extra logic.
hashed_value = if value.respond_to?(:to_json_hash_value)
value.to_json_hash_value
value.to_json_hash_value(options)
elsif field.respond_to?(:json_encode)
field.json_encode(value)
else
Expand Down

0 comments on commit 72bf456

Please sign in to comment.