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!

project admin: isAccountBillingSuspended optional chaining

Blue Mouse67aae41ca89b
diff --git a/apps/production/src/analytics/analytics.service.ts b/apps/production/src/analytics/analytics.service.ts
index 16eabda5d..9dcf5584d 100644
--- a/apps/production/src/analytics/analytics.service.ts
+++ b/apps/production/src/analytics/analytics.service.ts
@@ -453,7 +453,7 @@ export class AnalyticsService {
)
}
- if (project.admin.isAccountBillingSuspended) {
+ if (project.admin?.isAccountBillingSuspended) {
throw new HttpException(
'The account that owns this site is currently suspended, this is because of a billing issue. This, and all other events, are NOT being tracked and saved on our side. Please log in to your account on Swetrix or contact our support to resolve the issue.',
HttpStatus.PAYMENT_REQUIRED,