Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

refactor: remove redundant if(plan) guard since getPlan always returns non-null

Devin AIe77df4e6561d
diff --git a/backend/src/services/telemetry/telemetry-service.ts b/backend/src/services/telemetry/telemetry-service.ts
index d28370c5ea..9d21e82b16 100644
--- a/backend/src/services/telemetry/telemetry-service.ts
+++ b/backend/src/services/telemetry/telemetry-service.ts
@@ -124,10 +124,8 @@ To opt into telemetry, you can set "TELEMETRY_ENABLED=true" within the environme
try {
const plan = await licenseService.getPlan(orgId);
- if (plan) {
- properties.plan = plan.slug ?? "free";
- properties.seat_count = plan.membersUsed;
- }
+ properties.plan = plan.slug ?? "free";
+ properties.seat_count = plan.membersUsed;
} catch (error) {
logger.error(error, "Failed to fetch org plan for PostHog group properties");
}