diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-10-24 10:50:27 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-10-24 12:06:10 +0200 |
commit | 42ac987d961441c0413c47d384373476cc8cc833 (patch) | |
tree | 92fec8287cdf1a0d1cdc0f1c719ecd190f2731f8 /src/views/Contacts.vue | |
parent | 000f3ae886a67639e2a44fe82fd463f89f09ff8f (diff) |
Fix enable ab toggle
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src/views/Contacts.vue')
-rw-r--r-- | src/views/Contacts.vue | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/views/Contacts.vue b/src/views/Contacts.vue index a769f209..67a7fa39 100644 --- a/src/views/Contacts.vue +++ b/src/views/Contacts.vue @@ -282,13 +282,14 @@ export default { */ fetchContacts() { // wait for all addressbooks to have fetch their contacts - Promise.all(this.addressbooks.map(addressbook => this.$store.dispatch('getContactsFromAddressBook', { addressbook }))) - .then(results => { - this.loading = false - this.selectFirstContactIfNone() - }) - // no need for a catch, the action does not throw - // and the error is handled there + Promise.all(this.addressbooks.map(addressbook => { + if (addressbook.enabled) { + return this.$store.dispatch('getContactsFromAddressBook', { addressbook }) + } + })).then(results => { + this.loading = false + this.selectFirstContactIfNone() + }) }, /** |