Skip to content

Commit 2e64c6e

Browse files
danarnoldCopilot
andauthored
simplify params empty check in query set
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f2a03c8 commit 2e64c6e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/emailable/client.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ def request(method, endpoint, params = {})
3131
tries ||= 3
3232
http_response =
3333
if method == :get
34-
unless params_copy.empty?
35-
uri.query = URI.encode_www_form(params_copy)
36-
end
34+
uri.query = URI.encode_www_form(params_copy) if params_copy.any?
3735
request = Net::HTTP::Get.new(uri, headers)
3836
@connection.request(request)
3937
elsif method == :post

0 commit comments

Comments
 (0)