fix: panic when not select one provider (#614)

Signed-off-by: Sagilio <Sagilio@outlook.com>
This commit is contained in:
Sagilio 2022-03-24 12:15:10 +08:00 committed by GitHub
parent d0952ae908
commit a78b2de7b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,9 @@ func (application *Application) GetProviderItem(providerName string) *ProviderIt
}
func (pi *ProviderItem) IsProviderVisible() bool {
if pi.Provider == nil {
return false
}
return pi.Provider.Category == "OAuth" || pi.Provider.Category == "SAML"
}