mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
null check on policies response prop
This commit is contained in:
@@ -306,9 +306,11 @@ export class SyncService implements SyncServiceAbstraction {
|
||||
|
||||
private async syncPolicies(response: PolicyResponse[]) {
|
||||
const policies: { [id: string]: PolicyData; } = {};
|
||||
response.forEach((p) => {
|
||||
policies[p.id] = new PolicyData(p);
|
||||
});
|
||||
if (response != null) {
|
||||
response.forEach((p) => {
|
||||
policies[p.id] = new PolicyData(p);
|
||||
});
|
||||
}
|
||||
return await this.policyService.replace(policies);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user