From 5fd2b20d54dae0bf2756925e0338f8d4e36611ab Mon Sep 17 00:00:00 2001
From: Alexander Olofsson <alexander.olofsson@liu.se>
Date: Wed, 23 Oct 2019 14:56:51 +0200
Subject: [PATCH] Fix issue with rubocop change

---
 lib/passwordstate/client.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/passwordstate/client.rb b/lib/passwordstate/client.rb
index 0262991..95b99f1 100644
--- a/lib/passwordstate/client.rb
+++ b/lib/passwordstate/client.rb
@@ -80,7 +80,7 @@ module Passwordstate
     def request(method, api_path, options = {})
       uri = URI(server_url + "/#{api_type}/" + api_path)
       uri.query = URI.encode_www_form(options.fetch(:query)) if options.key? :query
-      uri.query = nil unless uri.query&.any?
+      uri.query = nil if uri.query.nil? || uri.query.empty?
 
       req_obj = Net::HTTP.const_get(method.to_s.capitalize.to_sym).new uri
       if options.key? :body
-- 
GitLab