mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
bug fixes in api models
This commit is contained in:
@@ -6,7 +6,10 @@ export class CollectionRequest {
|
||||
name: string;
|
||||
groups: SelectionReadOnlyRequest[] = [];
|
||||
|
||||
constructor(collection: Collection) {
|
||||
constructor(collection?: Collection) {
|
||||
if (collection == null) {
|
||||
return;
|
||||
}
|
||||
this.name = collection.name ? collection.name.encryptedString : null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ export class CollectionGroupDetailsResponse extends CollectionResponse {
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
if (response.Groups != null) {
|
||||
this.groups = response.Collections.map((g: any) => new SelectionReadOnlyResponse(g));
|
||||
this.groups = response.Groups.map((g: any) => new SelectionReadOnlyResponse(g));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user