1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-02-27 03:11:35 +01:00

[EC-584] Fixed OrganizationExportResponse to correctly parse data and use CollectionResponse and CipherResponse constructors

This commit is contained in:
Rui Tome 2022-09-28 11:46:01 +01:00
parent c243f3594e
commit c8fffa3bad
No known key found for this signature in database
GPG Key ID: 526239D96A8EC066

View File

@ -9,7 +9,13 @@ export class OrganizationExportResponse extends BaseResponse {
constructor(response: any) {
super(response);
this.collections = this.getResponseProperty("Collections");
this.ciphers = this.getResponseProperty("Ciphers");
const collections = this.getResponseProperty("Collections");
if (collections != null) {
this.collections = new ListResponse(collections, CollectionResponse);
}
const ciphers = this.getResponseProperty("Ciphers");
if (ciphers != null) {
this.ciphers = new ListResponse(ciphers, CipherResponse);
}
}
}