Skip to content

Commit 8236b5a

Browse files
Violation fix for latest rubocop (#2202)
Co-authored-by: Kayla Reopelle <87386821+kaylareopelle@users.noreply.github.com>
1 parent c0f34bb commit 8236b5a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/lib/opentelemetry/baggage/propagation/text_map_propagator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def inject(carrier, context: Context.current, setter: Context::Propagation.text_
3434
return if baggage.nil? || baggage.empty?
3535

3636
encoded_baggage = encode(baggage)
37-
setter.set(carrier, BAGGAGE_KEY, encoded_baggage) unless encoded_baggage&.empty?
37+
setter.set(carrier, BAGGAGE_KEY, encoded_baggage) if encoded_baggage && !encoded_baggage.empty?
3838
nil
3939
end
4040

0 commit comments

Comments
 (0)