when there are no providers do not blow up

This commit is contained in:
Sam 2013-08-01 16:05:46 +10:00
parent fbc28c2d64
commit 4fcba7a6f1

View File

@ -35,12 +35,11 @@ module Discourse
end
def self.auth_providers
providers = nil
providers = []
if plugins
plugins.each do |p|
next unless p.auth_providers
p.auth_providers.each do |prov|
providers ||= []
providers << prov
end
end