1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

null ref fix

This commit is contained in:
Kyle Spearrin 2017-07-06 16:31:46 -04:00
parent d346ee5169
commit ae48c8d9b5

View File

@ -41,7 +41,7 @@ namespace Bit.Api.Controllers
throw new UnauthorizedAccessException();
}
var providers = user.GetTwoFactorProviders().Select(p => new TwoFactorProviderResponseModel(p.Key, p.Value));
var providers = user.GetTwoFactorProviders()?.Select(p => new TwoFactorProviderResponseModel(p.Key, p.Value));
return new ListResponseModel<TwoFactorProviderResponseModel>(providers);
}