From defc78d0f86b880fe724a62726e38940e2bfd771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl-Gerhard=20Lindesva=CC=88rd?= Date: Thu, 28 Nov 2024 21:06:45 +0100 Subject: [PATCH] fix --- packages/db/src/clickhouse-client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/db/src/clickhouse-client.ts b/packages/db/src/clickhouse-client.ts index 5b8b67a1..eed2ff07 100644 --- a/packages/db/src/clickhouse-client.ts +++ b/packages/db/src/clickhouse-client.ts @@ -43,8 +43,8 @@ export const originalCh = createClient({ ...CLICKHOUSE_OPTIONS, }); -const cleanQuery = (query: string) => - query.replace(/\n/g, '').replace(/\s+/g, ' ').trim(); +const cleanQuery = (query?: string) => + query ? query.replace(/\n/g, '').replace(/\s+/g, ' ').trim() : undefined; export const ch = new Proxy(originalCh, { get(target, property, receiver) {