1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-29 06:33:53 +00: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

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;