diff --git a/lib/octokit/default.rb b/lib/octokit/default.rb index bd5806037..822254323 100644 --- a/lib/octokit/default.rb +++ b/lib/octokit/default.rb @@ -35,8 +35,7 @@ module Default # so we use it only when it's available. if defined?(Faraday::Request::Retry) builder.use Faraday::Request::Retry, exceptions: [Octokit::ServerError] - end - if defined?(Faraday::Retry::Middleware) + elsif defined?(Faraday::Retry::Middleware) builder.use Faraday::Retry::Middleware, exceptions: [Octokit::ServerError] end