From 3472978999eec35ede1f53dbf2f20d233b9cd270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Dr=C3=A9au?= Date: Wed, 20 Dec 2023 16:10:09 +0100 Subject: [PATCH] fix: build issue --- knexfile.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/knexfile.ts b/knexfile.ts index 6f3c4c305..cc2beb79f 100644 --- a/knexfile.ts +++ b/knexfile.ts @@ -13,8 +13,12 @@ export default { }, }; -function addApplicationName(connectionString: string): string { - return `${connectionString}${ - connectionString.includes('?') ? '&' : '?' - }application_name=FCU-API`; +function addApplicationName( + connectionString: string | undefined +): string | undefined { + return connectionString === undefined + ? undefined + : `${connectionString}${ + connectionString.includes('?') ? '&' : '?' + }application_name=FCU-API`; }