1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-25 12:05:59 +01:00

fix for crash on startup when policies are non-existent (#1579)

This commit is contained in:
Matt Portune 2021-10-14 13:53:57 -04:00 committed by GitHub
parent 62a8d1c017
commit a0bb16c35f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -201,6 +201,10 @@ namespace Bit.Core.Services
public async Task<bool> PolicyAppliesToUser(PolicyType policyType, Func<Policy, bool> policyFilter)
{
var policies = await GetAll(policyType);
if (policies == null)
{
return false;
}
var organizations = await _userService.GetAllOrganizationAsync();
IEnumerable<Policy> filteredPolicies;