From 0c9a8c12438b949c43eb52a39ddd4bc7a1981e1a Mon Sep 17 00:00:00 2001 From: Joel Taylor Date: Mon, 5 Apr 2021 19:50:33 -0700 Subject: [PATCH] Add nil check for Ruby 2.3 It's possible for `filters` to be `nil`, which causes Ruby 2.3 to raise an error: `TypeError: can't dup NilClass` --- lib/stripe/api_operations/list.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stripe/api_operations/list.rb b/lib/stripe/api_operations/list.rb index 939c09389..8fbbcbe0b 100644 --- a/lib/stripe/api_operations/list.rb +++ b/lib/stripe/api_operations/list.rb @@ -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