Skip to content

Commit daba962

Browse files
author
CYBS-Ruby
committed
Fixed condition for string null check
1 parent 1bdb82e commit daba962

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cybersource_rest_client/api_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def self.default
5959
# @return [Array<(Object, Fixnum, Hash)>] an array of 3 elements:
6060
# the data deserialized from response body (could be nil), response status code and response headers.
6161
def call_api(http_method, path, opts = {})
62-
if @accept_header != ''
62+
unless @accept_header.nil? || @accept_header.empty?
6363
default_accept_header = ',' + (opts[:header_params])['Accept']
6464
default_accept_header = @accept_header + default_accept_header.sub(',' + @accept_header, '')
6565
opts[:header_params]['Accept'] = default_accept_header

0 commit comments

Comments
 (0)