From 0930af578aaa657e098a4ff193f9fea6c4e165e9 Mon Sep 17 00:00:00 2001 From: matheusbsilva137 Date: Wed, 11 Dec 2024 10:50:55 -0300 Subject: [PATCH] Replace set by array --- apps/meteor/app/livechat/server/lib/contacts/updateContact.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/meteor/app/livechat/server/lib/contacts/updateContact.ts b/apps/meteor/app/livechat/server/lib/contacts/updateContact.ts index 188ee654467e..752bb62b301f 100644 --- a/apps/meteor/app/livechat/server/lib/contacts/updateContact.ts +++ b/apps/meteor/app/livechat/server/lib/contacts/updateContact.ts @@ -37,10 +37,10 @@ export async function updateContact(params: UpdateContactParams): Promise customField._id)]); + const workspaceAllowedCustomFieldsIds = workspaceAllowedCustomFields.map((customField) => customField._id); const currentCustomFieldsIds = Object.keys(contact.customFields || {}); const notRegisteredCustomFields = currentCustomFieldsIds - .filter((customFieldId) => !workspaceAllowedCustomFieldsIds.has(customFieldId)) + .filter((customFieldId) => !workspaceAllowedCustomFieldsIds.includes(customFieldId)) .map((customFieldId) => ({ _id: customFieldId })); const customFieldsToUpdate =