Skip to content

Commit 26f36cd

Browse files
committed
Minor refactor
1 parent f1e8d36 commit 26f36cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/ddtrace/propagation/grpc_propagator.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def origin
6060
private
6161

6262
def metadata_for_key(key)
63-
# metadata values can be arrays (multiple headers with the same values)
64-
return @metadata[key].first if @metadata[key].is_a?(Array)
65-
@metadata[key]
63+
# metadata values can be arrays (multiple headers with the same key)
64+
value = @metadata[key]
65+
value.is_a?(Array) ? value.first : value
6666
end
6767
end
6868
end

0 commit comments

Comments
 (0)