diff --git a/controllers/oauth2.js b/controllers/oauth2.js index aadc175442..3e0c6c9731 100644 --- a/controllers/oauth2.js +++ b/controllers/oauth2.js @@ -155,7 +155,7 @@ router.get('/username/:pseudonym', async (req, res, next) => { qs: { id: pseudonymResponse.userId }, $limit: 1, }); - if (userResponse.data?.length === 1) { + if (userResponse.data.length) { completeName = `${userResponse.data[0].firstName} ${userResponse.data[0].lastName}`; shortName = `${userResponse.data[0].firstName} ${userResponse.data[0].lastName.charAt(0)}.`; }