diff --git a/lib/travis/api/app/endpoint/authorization.rb b/lib/travis/api/app/endpoint/authorization.rb index a070431837..bd1af572ee 100644 --- a/lib/travis/api/app/endpoint/authorization.rb +++ b/lib/travis/api/app/endpoint/authorization.rb @@ -435,7 +435,7 @@ def generate_token(options) def acceptable?(scopes, lossy = false) Travis::Github::Oauth.wanted_scopes.all? do |scope| - acceptable_scopes_for(scope, lossy).any? { |s| scopes.include? s } + acceptable_scopes_for(scope, lossy).any? { |s| scopes&.include? s } end end