diff --git a/src/util/Injected/Utils.js b/src/util/Injected/Utils.js index 53cc348794..c3b421b7bb 100644 --- a/src/util/Injected/Utils.js +++ b/src/util/Injected/Utils.js @@ -1080,19 +1080,17 @@ exports.LoadUtils = () => { const contacts = window .require('WAWebCollections') .Contact.getModelsArray(); - return contacts.map(async (contact) => { - if (contact.isBusiness || contact.isEnterprise) { - const contactWid = window - .require('WAWebWidFactory') - .createWid(contact.id); - const bizProfile = await window - .require('WAWebCollections') - .BusinessProfile.find(contactWid); - bizProfile.profileOptions && - (contact.businessProfile = bizProfile); - } - return window.WWebJS.getContactModel(contact); - }); + return Promise.all( + contacts.map(async (contact) => { + if (contact.isBusiness || contact.isEnterprise) { + await window + .require('WAWebCollections') + .BusinessProfile.find(contact.id) + .catch(() => {}); + } + return window.WWebJS.getContactModel(contact); + }), + ); }; window.WWebJS.mediaInfoToFile = ({ data, mimetype, filename }) => {