Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

fix

Carl-Gerhard Lindesvärddefc78d0f86b
diff --git a/packages/db/src/clickhouse-client.ts b/packages/db/src/clickhouse-client.ts
index 5b8b67a10..eed2ff070 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) {