Skip to content

Commit

Permalink
Add nil check for Ruby 2.3
Browse files Browse the repository at this point in the history
It's possible for `filters` to be `nil`, which causes Ruby 2.3 to raise
an error: `TypeError: can't dup NilClass`
  • Loading branch information
joeltaylor committed Apr 6, 2021
1 parent ce4a205 commit 0c9a8c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/stripe/api_operations/list.rb
Expand Up @@ -11,7 +11,7 @@ def list(filters = {}, opts = {})

# set filters so that we can fetch the same limit, expansions, and
# predicates when accessing the next and previous pages
obj.filters = filters.dup
obj.filters = filters.dup unless filters.nil?
obj
end
end
Expand Down

0 comments on commit 0c9a8c1

Please sign in to comment.