Fix reference to non-existent object key

This commit is contained in:
Yarmo Mackenbach 2022-03-25 22:20:08 +01:00
parent 3bc9404340
commit c2a59d04c7
No known key found for this signature in database
GPG key ID: 37367F4AF4087AD1

View file

@ -128,11 +128,11 @@ const process = async (signature) => {
} }
result.users[0].userData = { result.users[0].userData = {
id: userData.userID ? userData.userID.userid : null, id: userData.userID ? userData.userID.userID : null,
name: userData.userID ? userData.userID.name : null, name: userData.userID ? userData.userID.name : null,
email: userData.userID ? userData.userID.email : null, email: userData.userID ? userData.userID.email : null,
comment: userData.userID ? userData.userID.comment : null, comment: userData.userID ? userData.userID.comment : null,
isPrimary: primaryUserData.user.userID.userid === userData.userID.userid isPrimary: primaryUserData.user.userID.userID === userData.userID.userID
} }
result.primaryUserIndex = result.users[0].userData.isPrimary ? 0 : null result.primaryUserIndex = result.users[0].userData.isPrimary ? 0 : null