Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Prevent extractMajorMinorVersion crashes

Blue Mousef99a398554e4
diff --git a/backend/apps/production/src/analytics/analytics.service.ts b/backend/apps/production/src/analytics/analytics.service.ts
index 571f7b661..e18ce68ba 100644
--- a/backend/apps/production/src/analytics/analytics.service.ts
+++ b/backend/apps/production/src/analytics/analytics.service.ts
@@ -2773,7 +2773,9 @@ export class AnalyticsService {
})
}
- extractMajorMinorVersion(version: string): string | null {
+ extractMajorMinorVersion(version: string | null): string | null {
+ if (!version) return null
+
const [major, minor = '0'] = version.split('.')
if (!major) return null