Skip to content

Commit

Permalink
Replace set by array
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusbsilva137 committed Dec 11, 2024
1 parent 0e8b95f commit 0930af5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/meteor/app/livechat/server/lib/contacts/updateContact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ export async function updateContact(params: UpdateContactParams): Promise<ILivec
}

const workspaceAllowedCustomFields = await getAllowedCustomFields();
const workspaceAllowedCustomFieldsIds = new Set([...workspaceAllowedCustomFields.map((customField) => 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 =
Expand Down

0 comments on commit 0930af5

Please sign in to comment.