Fixes getting 500 errors with some words.

This commit is contained in:
Pedro Howat 2024-10-17 15:00:30 -03:00
parent 3f4ba1ac2a
commit dbbec876c1

View File

@ -300,7 +300,7 @@ export class KwikController {
const [...contacts_solved] = await Promise.all([...contacts_promises]); const [...contacts_solved] = await Promise.all([...contacts_promises]);
const [...groups_solved] = await Promise.all([...groups_promises]); const [...groups_solved] = await Promise.all([...groups_promises]);
const contacts = Object.fromEntries(contacts_solved.map((c) => [`${c.owner}#${c.id}`, c])); const contacts = Object.fromEntries(contacts_solved.filter((c) => c != null).map((c) => [`${c.owner}#${c.id}`, c]));
const groups = Object.fromEntries( const groups = Object.fromEntries(
groups_solved.filter((g) => g !== null).map((g) => [`${g.instanceName}#${g.id}`, g]), groups_solved.filter((g) => g !== null).map((g) => [`${g.instanceName}#${g.id}`, g]),
); );