Use blank?
instead of checking for nil
This commit is contained in:
parent
2500b8daba
commit
f7fe111430
@ -119,7 +119,7 @@ module Utils
|
|||||||
end
|
end
|
||||||
|
|
||||||
def parse_headers(headers)
|
def parse_headers(headers)
|
||||||
return {} unless headers
|
return {} if headers.blank?
|
||||||
|
|
||||||
# Skip status code
|
# Skip status code
|
||||||
headers.split("\r\n")[1..].to_h do |h|
|
headers.split("\r\n")[1..].to_h do |h|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user