1
0
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:
Kyle Spearrin
2017-11-15 16:07:38 -05:00
parent 85447bb2ab
commit 5fa5fbc496
5 changed files with 36 additions and 39 deletions

View File

@@ -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;
}

View File

@@ -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,
});
}
});
}
}
}

View File

@@ -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));
}
});
}
}
}