mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
edge hates for of loops
This commit is contained in:
@@ -71,18 +71,18 @@ class Cipher extends Domain {
|
||||
|
||||
if (obj.attachments != null) {
|
||||
this.attachments = [];
|
||||
for (const attachment of obj.attachments) {
|
||||
obj.attachments.forEach((attachment) => {
|
||||
this.attachments.push(new Attachment(attachment, alreadyEncrypted));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.attachments = null;
|
||||
}
|
||||
|
||||
if (obj.fields != null) {
|
||||
this.fields = [];
|
||||
for (const field of obj.fields) {
|
||||
obj.fields.forEach((field) => {
|
||||
this.fields.push(new Field(field, alreadyEncrypted));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.fields = null;
|
||||
}
|
||||
|
||||
@@ -74,13 +74,13 @@ class CipherRequest {
|
||||
|
||||
if (cipher.fields) {
|
||||
this.fields = [];
|
||||
for (const field of cipher.fields) {
|
||||
cipher.fields.forEach((field: any) => {
|
||||
this.fields.push({
|
||||
type: field.type,
|
||||
name: field.name ? field.name.encryptedString : null,
|
||||
value: field.value ? field.value.encryptedString : null,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ class CipherResponse {
|
||||
|
||||
if (response.Attachments != null) {
|
||||
this.attachments = [];
|
||||
for (const attachment of response.Attachments) {
|
||||
response.Attachments.forEach((attachment: any) => {
|
||||
this.attachments.push(new AttachmentResponse(attachment));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user