From 65fe6b07d9e8a1d755f479cf12b187e08ed2ca77 Mon Sep 17 00:00:00 2001 From: Arne Gnisa Date: Fri, 22 Sep 2023 13:33:19 +0200 Subject: [PATCH] N21-1269 fix 2 --- controllers/oauth2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/oauth2.js b/controllers/oauth2.js index f5354e4b4d..10c32af198 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 > 0) { + if (userResponse.data.length > 0) { completeName = `${userResponse.data[0].firstName} ${userResponse.data[0].lastName}`; shortName = `${userResponse.data[0].firstName} ${userResponse.data[0].lastName.charAt(0)}.`; }