From b88ec2d051601edf41faca29c395e461e00bd2cc Mon Sep 17 00:00:00 2001 From: Theo Truong Date: Thu, 12 Dec 2024 10:35:32 -0700 Subject: [PATCH] # Signed-off-by: Theo Truong --- lib/opensearch/api/utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/opensearch/api/utils.rb b/lib/opensearch/api/utils.rb index 24f1df302..bd4c83dfd 100644 --- a/lib/opensearch/api/utils.rb +++ b/lib/opensearch/api/utils.rb @@ -30,7 +30,7 @@ def self.normalize_arguments(args) # @param [Set] valid_param_names the list of valid params names for the api method def self.validate_query_params(params, valid_param_names = nil) params.each_key do |k| - next if valid_param_names.present? && valid_param_names.include?(k) + next if valid_param_names&.include?(k) next if GLOBAL_QUERY_PARAMS.include?(k) raise ArgumentError, "URL parameter '#{k}' is not supported" end