properly handle null case for email destructuring

This commit is contained in:
Ulf Gebhardt 2025-04-03 00:51:07 +02:00
parent b88ad5617b
commit 57b3d4d4b8
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -332,7 +332,7 @@ const handleCreateMessage = async (resolve, root, args, context, resolveInfo) =>
return {
user: await txResponse.records.map((record) => record.get('recipientUser'))[0],
email: await txResponse.records.map((record) => record.get('emailAddress'))[0].email,
email: await txResponse.records.map((record) => record.get('emailAddress'))[0]?.email,
}
})