diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-11-03 12:22:39 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-11-03 12:22:39 +0100 |
commit | be742b544638b02a4381638c26ede8ac34845cbf (patch) | |
tree | c170e8953240ead062adbb33acff6cfa60c1fb74 /src/views | |
parent | 46e0cd9e74433b08623eee7c9cca8f8f8913760d (diff) |
Fix eslint
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src/views')
-rw-r--r-- | src/views/Contacts.vue | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/views/Contacts.vue b/src/views/Contacts.vue index 95b243cc..76a0d1be 100644 --- a/src/views/Contacts.vue +++ b/src/views/Contacts.vue @@ -559,11 +559,12 @@ export default { */ fetchContacts() { // wait for all addressbooks to have fetch their contacts - Promise.all(this.addressbooks.map(addressbook => { - if (addressbook.enabled) { + Promise.all(this.addressbooks + .filter(addressbook => addressbook.enabled) + .map(addressbook => { return this.$store.dispatch('getContactsFromAddressBook', { addressbook }) - } - })).then(results => { + }) + ).then(results => { this.loading = false if (!this.isMobile) { this.selectFirstContactIfNone() @@ -637,7 +638,7 @@ export default { downloadGroup(group) { // get grouped contacts let groupedContacts = {} - group.contacts.map((key) => { + group.contacts.forEach(key => { const id = this.contacts[key].addressbook.id groupedContacts = Object.assign({ [id]: { @@ -647,6 +648,7 @@ export default { }, groupedContacts) groupedContacts[id].contacts.push(this.contacts[key].url) }) + // create vcard promise with the requested contacts const vcardPromise = Promise.all( Object.keys(groupedContacts).map(key => |