mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
preserve collection ids on save
This commit is contained in:
@@ -30,7 +30,7 @@ class CipherData {
|
||||
attachments?: AttachmentData[];
|
||||
collectionIds?: string[];
|
||||
|
||||
constructor(response: CipherResponse, userId: string) {
|
||||
constructor(response: CipherResponse, userId: string, collectionIds?: string[]) {
|
||||
this.id = response.id;
|
||||
this.organizationId = response.organizationId;
|
||||
this.folderId = response.folderId;
|
||||
@@ -40,7 +40,12 @@ class CipherData {
|
||||
this.favorite = response.favorite;
|
||||
this.revisionDate = response.revisionDate;
|
||||
this.type = response.type;
|
||||
this.collectionIds = response.collectionIds;
|
||||
|
||||
if (collectionIds != null) {
|
||||
this.collectionIds = collectionIds;
|
||||
} else {
|
||||
this.collectionIds = response.collectionIds;
|
||||
}
|
||||
|
||||
this.name = response.data.Name;
|
||||
this.notes = response.data.Notes;
|
||||
|
||||
Reference in New Issue
Block a user