mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-31 17:57:43 +01:00
null check on policies response prop
This commit is contained in:
parent
72b4c4401a
commit
13d1067eda
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user