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ärd0dfd28c9ce2f
diff --git a/packages/db/src/clickhouse-client.ts b/packages/db/src/clickhouse-client.ts
index eed2ff070..d45f5b711 100644
--- a/packages/db/src/clickhouse-client.ts
+++ b/packages/db/src/clickhouse-client.ts
@@ -44,7 +44,9 @@ export const originalCh = createClient({
});
const cleanQuery = (query?: string) =>
- query ? query.replace(/\n/g, '').replace(/\s+/g, ' ').trim() : undefined;
+ typeof query === 'string'
+ ? query.replace(/\n/g, '').replace(/\s+/g, ' ').trim()
+ : undefined;
export const ch = new Proxy(originalCh, {
get(target, property, receiver) {