From a0795136ac502a90e14de9b3bd0a3e604b84dd79 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 1 Mar 2022 15:30:39 +0100 Subject: [PATCH] fix --- src/lib/database/applications.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/database/applications.ts b/src/lib/database/applications.ts index 79ee38876..64cc1444e 100644 --- a/src/lib/database/applications.ts +++ b/src/lib/database/applications.ts @@ -135,13 +135,13 @@ export async function getApplication({ id, teamId }) { } }); - if (body.gitSource?.githubApp?.clientSecret) { + if (body?.gitSource?.githubApp?.clientSecret) { body.gitSource.githubApp.clientSecret = decrypt(body.gitSource.githubApp.clientSecret); } - if (body.gitSource?.githubApp?.webhookSecret) { + if (body?.gitSource?.githubApp?.webhookSecret) { body.gitSource.githubApp.webhookSecret = decrypt(body.gitSource.githubApp.webhookSecret); } - if (body.gitSource?.githubApp?.privateKey) { + if (body?.gitSource?.githubApp?.privateKey) { body.gitSource.githubApp.privateKey = decrypt(body.gitSource.githubApp.privateKey); } if (body?.gitSource?.gitlabApp?.appSecret) {